9static const char*
TAG =
"SAO";
14 {
"mod_sao.title",
"SAO"},
36 LOG_I(
TAG,
"Initializing SAO module");
49 LOG_W(
TAG,
"SAO init failed (I2C1 may be unavailable)");
60 if (!items || maxItems == 0)
return 0;
82 auto&
module = cdc::mod_sao::SaoModule::instance();
Internationalization with English fallbacks in code and overlay translations loaded at runtime from a...
CDC Log: logging over TinyUSB CDC and UART.
#define LOG_W(tag, fmt,...)
#define LOG_I(tag, fmt,...)
bool registerModule(IModule *module)
Registers a module instance in the runtime registry.
static ModuleRegistry & instance()
Returns the singleton module registry instance.
void registerInitializer(ModuleInitFunc initFunc)
Registers a deferred module initializer callback.
static SaoModule & instance()
const char * getName() const override
uint8_t getMenuItems(core::ModuleMenuItem *items, uint8_t maxItems) override
Returns module menu items.
void onUnlock() override
Called when device is unlocked.
static I18n & instance()
Singleton accessor.
void registerEnglishTable(const I18nEntry *entries, std::size_t count)
Append English entries to the lookup table.
constexpr ui::I18nEntry kStrings[]
static void registerStrings()
static ui::IView * getInfoView()
static ui::InfoView s_infoView
static char s_infoText[256]
const char * tr(const char *key)
Look up a translation by string key.
void sao_get_info_string(char *buf, size_t len)
Single English translation entry.