mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
formatting
This commit is contained in:
14
src/common.h
14
src/common.h
@@ -54,17 +54,17 @@ using string_vector = std::vector<const char *>;
|
|||||||
|
|
||||||
#if defined(EMSESP_TEST) || defined(EMSESP_EN_ONLY)
|
#if defined(EMSESP_TEST) || defined(EMSESP_EN_ONLY)
|
||||||
// In testing just take one language (en) to save on Flash space
|
// In testing just take one language (en) to save on Flash space
|
||||||
#define MAKE_WORD_TRANSLATION(list_name, en, ...) static const char * const __pstr__L_##list_name[] = {en, nullptr};
|
#define MAKE_WORD_TRANSLATION(list_name, en, ...) static const char * const __pstr__L_##list_name[] = {en, nullptr};
|
||||||
#define MAKE_TRANSLATION(list_name, shortname, en, ...) static const char * const __pstr__L_##list_name[] = {shortname, en, nullptr};
|
#define MAKE_TRANSLATION(list_name, shortname, en, ...) static const char * const __pstr__L_##list_name[] = {shortname, en, nullptr};
|
||||||
#elif defined(EMSESP_DE_ONLY)
|
#elif defined(EMSESP_DE_ONLY)
|
||||||
#define MAKE_WORD_TRANSLATION(list_name, en, de, ...) static const char * const __pstr__L_##list_name[] = {de, nullptr};
|
#define MAKE_WORD_TRANSLATION(list_name, en, de, ...) static const char * const __pstr__L_##list_name[] = {de, nullptr};
|
||||||
#define MAKE_TRANSLATION(list_name, shortname, en, de, ...) static const char * const __pstr__L_##list_name[] = {shortname, de, nullptr};
|
#define MAKE_TRANSLATION(list_name, shortname, en, de, ...) static const char * const __pstr__L_##list_name[] = {shortname, de, nullptr};
|
||||||
#else
|
#else
|
||||||
#define MAKE_WORD_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_WORD_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||||
#define MAKE_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAKE_NOTRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_NOTRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||||
|
|
||||||
// fixed strings, no translations
|
// fixed strings, no translations
|
||||||
#define MAKE_ENUM_FIXED(enum_name, ...) static const char * const __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_ENUM_FIXED(enum_name, ...) static const char * const __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
|
||||||
|
|||||||
@@ -60,13 +60,11 @@ class WebSchedulerService : public StatefulService<WebScheduler> {
|
|||||||
bool command_setvalue(const char * value, const std::string name);
|
bool command_setvalue(const char * value, const std::string name);
|
||||||
bool get_value_info(JsonObject & output, const char * cmd);
|
bool get_value_info(JsonObject & output, const char * cmd);
|
||||||
|
|
||||||
private:
|
|
||||||
bool command(const char * cmd, const char * data);
|
|
||||||
|
|
||||||
// make all functions public so we can test in the debug and standalone mode
|
// make all functions public so we can test in the debug and standalone mode
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
bool command(const char * cmd, const char * data);
|
||||||
|
|
||||||
HttpEndpoint<WebScheduler> _httpEndpoint;
|
HttpEndpoint<WebScheduler> _httpEndpoint;
|
||||||
FSPersistence<WebScheduler> _fsPersistence;
|
FSPersistence<WebScheduler> _fsPersistence;
|
||||||
|
|||||||
Reference in New Issue
Block a user