-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e91f2e4
commit 61f5e9d
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef AIRLY_INCLUDE_AIRLY_CONFIG_H_ | ||
#define AIRLY_INCLUDE_AIRLY_CONFIG_H_ | ||
|
||
#if !defined(THING_MODEL_B) && !defined(THING_MODEL_M) | ||
#error \ | ||
"Undefined thing model! Please define thing model via macro THING_#####_# \ | ||
(Example: THING_MODEL_B). Supported thing models: Model B, Model M." | ||
#define THING_UNDEFINED | ||
#endif | ||
|
||
#endif // AIRLY_INCLUDE_AIRLY_CONFIG_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef AIRLY_INCLUDE_AIRLY_I18N_H_ | ||
#define AIRLY_INCLUDE_AIRLY_I18N_H_ | ||
|
||
/* Compilation-time config */ | ||
#include <airly/Config.h> | ||
|
||
#if !defined(LANG_EN_US) | ||
#define LANG_UNDEFINED | ||
#error \ | ||
"Undefined language! Please define language via macro LANG_##_## \ | ||
(Example: LANG_EN_US). Available languages: en-US." | ||
#else | ||
#define LANG_DEFINED | ||
#endif | ||
|
||
namespace i18n { | ||
|
||
extern const char* DeviceTitle; | ||
|
||
} // namespace i18n | ||
|
||
#endif // AIRLY_INCLUDE_AIRLY_I18N_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <airly/i18n.h> | ||
|
||
// -------------------------------------------------------------------------- // | ||
// Translations: stub | ||
// -------------------------------------------------------------------------- // | ||
#if defined(LANG_UNDEFINED) | ||
|
||
namespace i18n { | ||
|
||
const char* DeviceTitle = ""; | ||
|
||
} // namespace i18n | ||
|
||
#endif | ||
// -------------------------------------------------------------------------- // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <airly/I18n.h> | ||
|
||
/* AVR low-level */ | ||
#include <avr/pgmspace.h> | ||
|
||
// -------------------------------------------------------------------------- // | ||
// Translations: common | ||
// -------------------------------------------------------------------------- // | ||
#if defined(LANG_DEFINED) && defined(THING_MODEL_B) | ||
|
||
namespace i18n { | ||
|
||
const char* DeviceTitle PROGMEM = "Airly Model B"; | ||
|
||
} // namespace i18n | ||
|
||
#endif | ||
// -------------------------------------------------------------------------- // |