From 535c285775ce5908ef6bf5efece49903627828fc Mon Sep 17 00:00:00 2001 From: Pascal Brunot Date: Sat, 21 Dec 2024 08:38:13 +0100 Subject: [PATCH] Make globals in headers inline constexpr --- conf/conf.hpp | 86 +++++++++++++++++------------------ conf/secrets.hpp.example | 16 +++---- include/PinsConfig.hpp | 2 +- include/card.hpp | 2 +- include/language/en-US.hpp | 92 +++++++++++++++++++------------------- include/language/it-IT.hpp | 92 +++++++++++++++++++------------------- 6 files changed, 145 insertions(+), 145 deletions(-) diff --git a/conf/conf.hpp b/conf/conf.hpp index 5de540c3..4028c140 100644 --- a/conf/conf.hpp +++ b/conf/conf.hpp @@ -15,16 +15,16 @@ namespace fabomatic namespace conf::default_config { /// @brief Default MachineID for backend. Can be overriden through WiFi Portal config - static constexpr MachineID machine_id{1}; + inline constexpr MachineID machine_id{1}; /// @brief Default machine name for LCD. Will be overriden with Backend config data - static constexpr std::string_view machine_name{"MACHINE1"}; + inline constexpr std::string_view machine_name{"MACHINE1"}; /// @brief Default machine type. No impact on code - static constexpr MachineType machine_type{MachineType::Printer3D}; + inline constexpr MachineType machine_type{MachineType::Printer3D}; /// @brief Default hostname for the ESP32 board, Machine ID will be added to the hostname in order to form unique hostnames - static constexpr std::string_view hostname{"BOARD"}; + inline constexpr std::string_view hostname{"BOARD"}; } // namespace conf::default_config @@ -32,9 +32,9 @@ namespace fabomatic namespace conf::rfid_tags { /// @brief Number of bytes in RFID cards UID, may depend on specific RFID chip - static constexpr uint8_t UID_BYTE_LEN{4}; + inline constexpr uint8_t UID_BYTE_LEN{4}; /// @brief Number of cached UID, persisted in flash - static constexpr uint8_t CACHE_LEN{10}; + inline constexpr uint8_t CACHE_LEN{10}; } // namespace conf::rfid_tags @@ -42,13 +42,13 @@ namespace fabomatic namespace conf::lcd { /// @brief Number of rows for LCD display - static constexpr uint8_t ROWS{2}; + inline constexpr uint8_t ROWS{2}; /// @brief Number of cols for LCD display - static constexpr uint8_t COLS{16}; + inline constexpr uint8_t COLS{16}; /// @brief How much time shall we wait for a short message on LCD for user - static constexpr auto SHORT_MESSAGE_DELAY{1s}; + inline constexpr auto SHORT_MESSAGE_DELAY{1s}; } // namespace conf::lcd @@ -56,22 +56,22 @@ namespace fabomatic namespace conf::machine { /// @brief User will be log out after this delay. If 0h, no auto-logout. This may be overriden by backend data - static constexpr auto DEFAULT_AUTO_LOGOFF_DELAY{12h}; + inline constexpr auto DEFAULT_AUTO_LOGOFF_DELAY{12h}; /// @brief Idle time before poweroff. If 0min, machine will stay on. - static constexpr auto DEFAULT_GRACE_PERIOD{90s}; + inline constexpr auto DEFAULT_GRACE_PERIOD{90s}; /// @brief Beeps will be heard every 30s when the machine is in grace period - static constexpr auto DELAY_BETWEEN_BEEPS{30s}; + inline constexpr auto DELAY_BETWEEN_BEEPS{30s}; /// @brief If true, machine needing maintenance will be blocked for normal users - static constexpr bool MAINTENANCE_BLOCK{true}; + inline constexpr bool MAINTENANCE_BLOCK{true}; /// @brief Minimum time to confirm by long tap maintenance - static constexpr auto LONG_TAP_DURATION{10s}; + inline constexpr auto LONG_TAP_DURATION{10s}; /// @brief Disabled RFID reading after a successfull read for X seconds. - static constexpr auto DELAY_BETWEEN_SWEEPS{2s}; + inline constexpr auto DELAY_BETWEEN_SWEEPS{2s}; } // namespace conf::machine @@ -79,22 +79,22 @@ namespace fabomatic namespace conf::debug { /// @brief True to add logs to serial output - static constexpr bool ENABLE_LOGS{true}; + inline constexpr bool ENABLE_LOGS{true}; /// @brief True to add many logs regarding tasks scheduling and statistics - static constexpr bool ENABLE_TASK_LOGS{false}; + inline constexpr bool ENABLE_TASK_LOGS{false}; /// @brief Serial speed in bauds - static constexpr unsigned long SERIAL_SPEED_BDS{115200}; + inline constexpr unsigned long SERIAL_SPEED_BDS{115200}; /// @brief True to force portal startup. May be useful to override saved configuration - static constexpr bool FORCE_PORTAL{false}; + inline constexpr bool FORCE_PORTAL{false}; /// @brief True to force EEPROM settings to defaults, regardless of actual values. - static constexpr bool LOAD_EEPROM_DEFAULTS{false}; + inline constexpr bool LOAD_EEPROM_DEFAULTS{false}; /// @brief True if important MQTT messages should be saved when network is down and replayed. - static constexpr bool ENABLE_BUFFERING{true}; + inline constexpr bool ENABLE_BUFFERING{true}; } // namespace conf::debug @@ -102,10 +102,10 @@ namespace fabomatic namespace conf::buzzer { /// @brief Single beep duration, typical value 200ms. Set to 0 to disable beeps. - static constexpr auto STANDARD_BEEP_DURATION{250ms}; + inline constexpr auto STANDARD_BEEP_DURATION{250ms}; /// @brief Number of beeps every time the function is called - static constexpr auto NB_BEEPS{3}; + inline constexpr auto NB_BEEPS{3}; } // namespace conf::buzzer @@ -113,25 +113,25 @@ namespace fabomatic namespace conf::tasks { /// @brief Task period to check for RFID badge (should be fast: 150ms) - static constexpr auto RFID_CHECK_PERIOD{150ms}; + inline constexpr auto RFID_CHECK_PERIOD{150ms}; /// @brief Performs RFID self check and reset chip if necessary (default: 60s) - static constexpr auto RFID_SELFTEST_PERIOD{60s}; + inline constexpr auto RFID_SELFTEST_PERIOD{60s}; /// @brief Query the MQTT broker for machine state at given period (default: 30s) - static constexpr auto MQTT_REFRESH_PERIOD{30s}; + inline constexpr auto MQTT_REFRESH_PERIOD{30s}; /// @brief Timeout for hardware watchdog, set to 0s to disable (default: 60s) - static constexpr auto WATCHDOG_TIMEOUT{60s}; + inline constexpr auto WATCHDOG_TIMEOUT{60s}; /// @brief Period of the watchdog signaling task (default 1s) - static constexpr auto WATCHDOG_PERIOD{1s}; + inline constexpr auto WATCHDOG_PERIOD{1s}; /// @brief Timeout for portal configuration (default: 5min) - static constexpr auto PORTAL_CONFIG_TIMEOUT{5min}; + inline constexpr auto PORTAL_CONFIG_TIMEOUT{5min}; /// @brief Board announcement on the MQTT server (default: 2min) - static constexpr auto MQTT_ALIVE_PERIOD{2min}; + inline constexpr auto MQTT_ALIVE_PERIOD{2min}; } // namespace conf::tasks @@ -139,47 +139,47 @@ namespace fabomatic namespace conf::mqtt { /// @brief Initial part of the topic, machine ID will be added - static constexpr std::string_view topic{"machine"}; + inline constexpr std::string_view topic{"machine"}; /// @brief Backend reply (sub-topic of the full machine topic) - static constexpr std::string_view response_topic{"/reply"}; + inline constexpr std::string_view response_topic{"/reply"}; /// @brief Backend requests (sub-topic of the full machine topic) - static constexpr std::string_view request_topic{"/request"}; + inline constexpr std::string_view request_topic{"/request"}; /// @brief Number of tries to get a reply from the backend - static constexpr auto MAX_TRIES{1}; + inline constexpr auto MAX_TRIES{1}; /// @brief Timeout for a single backend reply request. - static constexpr auto TIMEOUT_REPLY_SERVER{2s}; + inline constexpr auto TIMEOUT_REPLY_SERVER{2s}; /// @brief Once backend is unresponsive, wait at least this period before to try again - static constexpr auto FAIL_FAST_PERIOD {45s}; + inline constexpr auto FAIL_FAST_PERIOD {45s}; /// @brief MQTT port for broker - static constexpr auto PORT_NUMBER{1883}; + inline constexpr auto PORT_NUMBER{1883}; /// @brief Name of the default server for Backend. Will be resolved through mDNS - static constexpr std::string_view mqtt_server{"fabpi2.local"}; + inline constexpr std::string_view mqtt_server{"fabpi2.local"}; /// @brief In case Shelly is used, name of the topic on MQTT Broker - static constexpr std::string_view mqtt_switch_topic{""}; + inline constexpr std::string_view mqtt_switch_topic{""}; /// @brief What value shall be written on the topic to switch on the Shelly device - static constexpr std::string_view mqtt_switch_on_message{"on"}; + inline constexpr std::string_view mqtt_switch_on_message{"on"}; /// @brief What value shall be written on the topic to switch off the Shelly device - static constexpr std::string_view mqtt_switch_off_message{"off"}; + inline constexpr std::string_view mqtt_switch_off_message{"off"}; } // namespace conf::mqtt /// @brief Other compile-time settings namespace conf::common { /// @brief Maximum length of saved string in WiFiManager portal. - static constexpr auto STR_MAX_LENGTH{40U}; + inline constexpr auto STR_MAX_LENGTH{40U}; /// @brief Maximum length of saved integer in WiFiManager portal. - static constexpr auto INT_MAX_LENGTH{5U}; + inline constexpr auto INT_MAX_LENGTH{5U}; } // Checks on configured values diff --git a/conf/secrets.hpp.example b/conf/secrets.hpp.example index 700deb7d..39653cf1 100644 --- a/conf/secrets.hpp.example +++ b/conf/secrets.hpp.example @@ -13,14 +13,14 @@ namespace fabomatic::secrets::cards { /// @brief Number of whitelisted card in the array below - static constexpr uint8_t LEN = 10U; + inline constexpr uint8_t LEN = 10U; using WhiteListEntry = std::tuple; using WhiteList = std::array; /// @brief Static list of whitelisted RFID cards. /// @note If the network is down, these cards will be authorized. If network is up, backend prevails. - static constexpr WhiteList whitelist{ + inline constexpr WhiteList whitelist{ std::make_tuple(0xAABBCCD1, FabUser::UserLevel::FabAdmin, "ABCDEFG"), std::make_tuple(0xAABBCCD2, FabUser::UserLevel::FabAdmin, "PIPPO"), std::make_tuple(0xAABBCCD3, FabUser::UserLevel::NormalUser, "USER1"), @@ -38,18 +38,18 @@ namespace fabomatic::secrets::credentials { #if (PINS_WOKWI) - static constexpr std::string_view ssid = "Wokwi-GUEST"; /* WOKWI SSID */ - static constexpr std::string_view password = ""; /* WOKWI password */ + inline constexpr std::string_view ssid = "Wokwi-GUEST"; /* WOKWI SSID */ + inline constexpr std::string_view password = ""; /* WOKWI password */ #else - static constexpr std::string_view ssid = "MYSSID"; /* Default SSID */ - static constexpr std::string_view password = "MYPWD"; /* Default password */ + inline constexpr std::string_view ssid = "MYSSID"; /* Default SSID */ + inline constexpr std::string_view password = "MYPWD"; /* Default password */ #endif /// @brief Username for MQTT broker auth. - static constexpr std::string_view mqtt_user = "user"; + inline constexpr std::string_view mqtt_user = "user"; /// @brief Username for MQTT broker auth. - static constexpr std::string_view mqtt_password = "password"; + inline constexpr std::string_view mqtt_password = "password"; // Checks static_assert(secrets::credentials::ssid.size() < conf::common::STR_MAX_LENGTH, "SSID is too long"); diff --git a/include/PinsConfig.hpp b/include/PinsConfig.hpp index 123c7917..373f6b9a 100644 --- a/include/PinsConfig.hpp +++ b/include/PinsConfig.hpp @@ -7,7 +7,7 @@ namespace fabomatic { /// @brief Constant used to indicate the pin is not used - static constexpr uint8_t NO_PIN = -1; + inline constexpr uint8_t NO_PIN = -1; struct pins_config { diff --git a/include/card.hpp b/include/card.hpp index 54996b5c..46cf9f7c 100644 --- a/include/card.hpp +++ b/include/card.hpp @@ -12,7 +12,7 @@ namespace fabomatic::card { using uid_t = u_int64_t; - static constexpr uid_t INVALID = 0ULL; + inline constexpr uid_t INVALID = 0ULL; /** * @brief Returns a string representation of the UID diff --git a/include/language/en-US.hpp b/include/language/en-US.hpp index 7a2e7bb0..72ec652e 100644 --- a/include/language/en-US.hpp +++ b/include/language/en-US.hpp @@ -3,70 +3,70 @@ namespace fabomatic::strings::en_US { - static constexpr auto S_LANG_ID = "en-US"; + inline constexpr auto S_LANG_ID = "en-US"; - static constexpr auto S_BUSY = "Busy"; - static constexpr auto S_CANCELLED = "* CANCELLED *"; - static constexpr auto S_CONFIRMED = "* CONFIRMED *"; - static constexpr auto S_LONGTAP_PROMPT = "Record?"; + inline constexpr auto S_BUSY = "Busy"; + inline constexpr auto S_CANCELLED = "* CANCELLED *"; + inline constexpr auto S_CONFIRMED = "* CONFIRMED *"; + inline constexpr auto S_LONGTAP_PROMPT = "Record?"; - static constexpr auto S_MACHINE_BLOCKED = "> BLOCKED <"; - static constexpr auto S_MACHINE_MAINTENANCE = "Maintenance"; - static constexpr auto S_CARD_PROMPT = "Pass your card"; - static constexpr auto S_USED_BY = "In use by"; + inline constexpr auto S_MACHINE_BLOCKED = "> BLOCKED <"; + inline constexpr auto S_MACHINE_MAINTENANCE = "Maintenance"; + inline constexpr auto S_CARD_PROMPT = "Pass your card"; + inline constexpr auto S_USED_BY = "In use by"; - static constexpr auto S_START_USE = "Use started"; - static constexpr auto S_LOGIN_DENIED = "Unknown card"; - static constexpr auto S_GOODBYE = "Goodbye"; + inline constexpr auto S_START_USE = "Use started"; + inline constexpr auto S_LOGIN_DENIED = "Unknown card"; + inline constexpr auto S_GOODBYE = "Goodbye"; - static constexpr auto S_CONNECTING_MQTT_1 = "Connecting"; - static constexpr auto S_CONNECTING_MQTT_2 = "to MQTT server"; + inline constexpr auto S_CONNECTING_MQTT_1 = "Connecting"; + inline constexpr auto S_CONNECTING_MQTT_2 = "to MQTT server"; - static constexpr auto S_CONNECTED = "Connected"; - static constexpr auto S_HELLO = "Hello"; + inline constexpr auto S_CONNECTED = "Connected"; + inline constexpr auto S_HELLO = "Hello"; - static constexpr auto S_WORKING = "Working..."; - static constexpr auto S_OFFLINE_MODE = "OFFLINE MODE"; + inline constexpr auto S_WORKING = "Working..."; + inline constexpr auto S_OFFLINE_MODE = "OFFLINE MODE"; - static constexpr auto S_BLOCKED_ADMIN_1 = "Blocked by"; - static constexpr auto S_BLOCKED_ADMIN_2 = "admins"; + inline constexpr auto S_BLOCKED_ADMIN_1 = "Blocked by"; + inline constexpr auto S_BLOCKED_ADMIN_2 = "admins"; - static constexpr auto S_VERIFYING_1 = "Verifying"; - static constexpr auto S_VERIFYING_2 = "card..."; + inline constexpr auto S_VERIFYING_1 = "Verifying"; + inline constexpr auto S_VERIFYING_2 = "card..."; - static constexpr auto S_BLOCKED_MAINTENANCE_1 = "Blocked for"; - static constexpr auto S_BLOCKED_MAINTENANCE_2 = "maintenance"; + inline constexpr auto S_BLOCKED_MAINTENANCE_1 = "Blocked for"; + inline constexpr auto S_BLOCKED_MAINTENANCE_2 = "maintenance"; - static constexpr auto S_PROMPT_MAINTENANCE_1 = "Maintenance"; - static constexpr auto S_PROMPT_MAINTENANCE_2 = "record ?"; + inline constexpr auto S_PROMPT_MAINTENANCE_1 = "Maintenance"; + inline constexpr auto S_PROMPT_MAINTENANCE_2 = "record ?"; - static constexpr auto S_MAINTENANCE_REGISTERED_1 = "Maintenance"; - static constexpr auto S_MAINTENANCE_REGISTERED_2 = "recorded"; + inline constexpr auto S_MAINTENANCE_REGISTERED_1 = "Maintenance"; + inline constexpr auto S_MAINTENANCE_REGISTERED_2 = "recorded"; - static constexpr auto S_GENERIC_ERROR = "Error"; - static constexpr auto S_HW_ERROR = "HW error"; - static constexpr auto S_PORTAL_ERROR = "Portal error"; - static constexpr auto S_OTA_ERROR = "OTA error"; - static constexpr auto S_STATUS_ERROR_1 = "Unhandled status"; - static constexpr auto S_STATUS_ERROR_2 = "value"; + inline constexpr auto S_GENERIC_ERROR = "Error"; + inline constexpr auto S_HW_ERROR = "HW error"; + inline constexpr auto S_PORTAL_ERROR = "Portal error"; + inline constexpr auto S_OTA_ERROR = "OTA error"; + inline constexpr auto S_STATUS_ERROR_1 = "Unhandled status"; + inline constexpr auto S_STATUS_ERROR_2 = "value"; - static constexpr auto S_PORTAL_SUCCESS = "WiFi conf. OK"; - static constexpr auto S_OPEN_PORTAL = "Open portal"; + inline constexpr auto S_PORTAL_SUCCESS = "WiFi conf. OK"; + inline constexpr auto S_OPEN_PORTAL = "Open portal"; - static constexpr auto S_BOOTING = "Booting..."; + inline constexpr auto S_BOOTING = "Booting..."; - static constexpr auto S_SHUTTING_DOWN = "Shutting down!"; + inline constexpr auto S_SHUTTING_DOWN = "Shutting down!"; - static constexpr auto UPDATE_OTA_1 = "Upgrading"; - static constexpr auto UPDATE_OTA_2 = "OTA..."; + inline constexpr auto UPDATE_OTA_1 = "Upgrading"; + inline constexpr auto UPDATE_OTA_2 = "OTA..."; - static constexpr auto FACTORY_RESET_DONE_1 = "Factory reset"; - static constexpr auto FACTORY_RESET_DONE_2 = "Wait reboot"; + inline constexpr auto FACTORY_RESET_DONE_1 = "Factory reset"; + inline constexpr auto FACTORY_RESET_DONE_2 = "Wait reboot"; - static constexpr auto PORTAL_TITLE = "FAB-O-MATIC"; - static constexpr auto PORTAL_MACHINE_ID_PROMPT = "Machine ID"; - static constexpr auto PORTAL_SHELLY_MQTT_PROMPT = "Shelly MQTT topic (can be empty)"; - static constexpr auto PORTAL_MQTT_BROKER_PROMPT = "MQTT broker (IP or hostname)"; + inline constexpr auto PORTAL_TITLE = "FAB-O-MATIC"; + inline constexpr auto PORTAL_MACHINE_ID_PROMPT = "Machine ID"; + inline constexpr auto PORTAL_SHELLY_MQTT_PROMPT = "Shelly MQTT topic (can be empty)"; + inline constexpr auto PORTAL_MQTT_BROKER_PROMPT = "MQTT broker (IP or hostname)"; } // namespace fabomatic::strings::en_US diff --git a/include/language/it-IT.hpp b/include/language/it-IT.hpp index 897e45ba..7dc2d55a 100644 --- a/include/language/it-IT.hpp +++ b/include/language/it-IT.hpp @@ -3,70 +3,70 @@ namespace fabomatic::strings::it_IT { - static constexpr auto S_LANG_ID = "it-IT"; + inline constexpr auto S_LANG_ID = "it-IT"; - static constexpr auto S_BUSY = "Occupata"; - static constexpr auto S_CANCELLED = "* ANNULLATO *"; - static constexpr auto S_CONFIRMED = "* CONFERMATO *"; - static constexpr auto S_LONGTAP_PROMPT = "Registrare?"; + inline constexpr auto S_BUSY = "Occupata"; + inline constexpr auto S_CANCELLED = "* ANNULLATO *"; + inline constexpr auto S_CONFIRMED = "* CONFERMATO *"; + inline constexpr auto S_LONGTAP_PROMPT = "Registrare?"; - static constexpr auto S_MACHINE_BLOCKED = "> BLOCCATA <"; - static constexpr auto S_MACHINE_MAINTENANCE = "Manutenzione"; - static constexpr auto S_CARD_PROMPT = "Avvicina carta"; - static constexpr auto S_USED_BY = "In uso da"; + inline constexpr auto S_MACHINE_BLOCKED = "> BLOCCATA <"; + inline constexpr auto S_MACHINE_MAINTENANCE = "Manutenzione"; + inline constexpr auto S_CARD_PROMPT = "Avvicina carta"; + inline constexpr auto S_USED_BY = "In uso da"; - static constexpr auto S_START_USE = "Inizio uso"; - static constexpr auto S_LOGIN_DENIED = "Carta ignota"; - static constexpr auto S_GOODBYE = "Arrivederci"; + inline constexpr auto S_START_USE = "Inizio uso"; + inline constexpr auto S_LOGIN_DENIED = "Carta ignota"; + inline constexpr auto S_GOODBYE = "Arrivederci"; - static constexpr auto S_CONNECTING_MQTT_1 = "Connessione"; - static constexpr auto S_CONNECTING_MQTT_2 = "al server MQTT"; + inline constexpr auto S_CONNECTING_MQTT_1 = "Connessione"; + inline constexpr auto S_CONNECTING_MQTT_2 = "al server MQTT"; - static constexpr auto S_CONNECTED = "MQTT connesso"; - static constexpr auto S_HELLO = "Ciao"; + inline constexpr auto S_CONNECTED = "MQTT connesso"; + inline constexpr auto S_HELLO = "Ciao"; - static constexpr auto S_WORKING = "Elaborazione..."; - static constexpr auto S_OFFLINE_MODE = "OFFLINE MODE"; + inline constexpr auto S_WORKING = "Elaborazione..."; + inline constexpr auto S_OFFLINE_MODE = "OFFLINE MODE"; - static constexpr auto S_BLOCKED_ADMIN_1 = "Blocco"; - static constexpr auto S_BLOCKED_ADMIN_2 = "amministrativo"; + inline constexpr auto S_BLOCKED_ADMIN_1 = "Blocco"; + inline constexpr auto S_BLOCKED_ADMIN_2 = "amministrativo"; - static constexpr auto S_VERIFYING_1 = "Verifica"; - static constexpr auto S_VERIFYING_2 = "in corso..."; + inline constexpr auto S_VERIFYING_1 = "Verifica"; + inline constexpr auto S_VERIFYING_2 = "in corso..."; - static constexpr auto S_BLOCKED_MAINTENANCE_1 = "Blocco per"; - static constexpr auto S_BLOCKED_MAINTENANCE_2 = "manutenzione"; + inline constexpr auto S_BLOCKED_MAINTENANCE_1 = "Blocco per"; + inline constexpr auto S_BLOCKED_MAINTENANCE_2 = "manutenzione"; - static constexpr auto S_PROMPT_MAINTENANCE_1 = "Manutenzione?"; - static constexpr auto S_PROMPT_MAINTENANCE_2 = "Registra"; + inline constexpr auto S_PROMPT_MAINTENANCE_1 = "Manutenzione?"; + inline constexpr auto S_PROMPT_MAINTENANCE_2 = "Registra"; - static constexpr auto S_MAINTENANCE_REGISTERED_1 = "Manutenzione"; - static constexpr auto S_MAINTENANCE_REGISTERED_2 = "registrata"; + inline constexpr auto S_MAINTENANCE_REGISTERED_1 = "Manutenzione"; + inline constexpr auto S_MAINTENANCE_REGISTERED_2 = "registrata"; - static constexpr auto S_GENERIC_ERROR = "Errore"; - static constexpr auto S_HW_ERROR = "Errore HW"; - static constexpr auto S_PORTAL_ERROR = "Errore portale"; - static constexpr auto S_OTA_ERROR = "Errore OTA"; - static constexpr auto S_STATUS_ERROR_1 = "Unhandled status"; - static constexpr auto S_STATUS_ERROR_2 = "value"; + inline constexpr auto S_GENERIC_ERROR = "Errore"; + inline constexpr auto S_HW_ERROR = "Errore HW"; + inline constexpr auto S_PORTAL_ERROR = "Errore portale"; + inline constexpr auto S_OTA_ERROR = "Errore OTA"; + inline constexpr auto S_STATUS_ERROR_1 = "Unhandled status"; + inline constexpr auto S_STATUS_ERROR_2 = "value"; - static constexpr auto S_PORTAL_SUCCESS = "Conf. WiFi OK"; - static constexpr auto S_OPEN_PORTAL = "Apri portale"; + inline constexpr auto S_PORTAL_SUCCESS = "Conf. WiFi OK"; + inline constexpr auto S_OPEN_PORTAL = "Apri portale"; - static constexpr auto S_BOOTING = "Avvio..."; + inline constexpr auto S_BOOTING = "Avvio..."; - static constexpr auto S_SHUTTING_DOWN = "In spegnimento!"; + inline constexpr auto S_SHUTTING_DOWN = "In spegnimento!"; - static constexpr auto UPDATE_OTA_1 = "Aggiornamento"; - static constexpr auto UPDATE_OTA_2 = "OTA..."; + inline constexpr auto UPDATE_OTA_1 = "Aggiornamento"; + inline constexpr auto UPDATE_OTA_2 = "OTA..."; - static constexpr auto FACTORY_RESET_DONE_1 = "Param. reset"; - static constexpr auto FACTORY_RESET_DONE_2 = "Attesa reboot"; + inline constexpr auto FACTORY_RESET_DONE_1 = "Param. reset"; + inline constexpr auto FACTORY_RESET_DONE_2 = "Attesa reboot"; - static constexpr auto PORTAL_TITLE = "FAB-O-MATIC"; - static constexpr auto PORTAL_MACHINE_ID_PROMPT = "ID della macchina"; - static constexpr auto PORTAL_SHELLY_MQTT_PROMPT = "Topic MQTT per Shelly (facoltativo)"; - static constexpr auto PORTAL_MQTT_BROKER_PROMPT = "Indirizzo o nome MQTT broker"; + inline constexpr auto PORTAL_TITLE = "FAB-O-MATIC"; + inline constexpr auto PORTAL_MACHINE_ID_PROMPT = "ID della macchina"; + inline constexpr auto PORTAL_SHELLY_MQTT_PROMPT = "Topic MQTT per Shelly (facoltativo)"; + inline constexpr auto PORTAL_MQTT_BROKER_PROMPT = "Indirizzo o nome MQTT broker"; } // namespace fabomatic::strings::it_IT #endif \ No newline at end of file