Files
OptoTest/OpticalChannelTester/Config_Text.h

151 lines
5.3 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
// Select the language used by the OLED interface.
// Build with UI_LANGUAGE_EN for English or UI_LANGUAGE_RU for Russian.
#define UI_LANGUAGE_EN 0
#define UI_LANGUAGE_RU 1
#ifndef UI_LANGUAGE
#define UI_LANGUAGE UI_LANGUAGE_RU
#endif
namespace UiText {
#if UI_LANGUAGE == UI_LANGUAGE_RU
constexpr const char *ROLE_NAMES[] = {
"СОЛО", "МАСТЕР", "СЛЕЙВ"
};
constexpr const char *TEST_NAMES[] = {
"ОПТИКА", "ДРАЙВЕР"
};
constexpr const char *FAIL_NAMES[] = {
"НЕТ ОШИБКИ",
"НЕТ СИГНАЛА",
"ПЕРИОД ВНЕ ДОПУСКА",
"ИМПУЛЬС ВНЕ ДОПУСКА",
"ЛИШНИЙ ФРОНТ",
"ИМПУЛЬСНАЯ ПОМЕХА",
"ПРОПУЩЕН ФРОНТ",
"ОШИБКА ПОТЕРИ ДАННЫХ",
"СВЯЗЬ ПОТЕРЯНА",
"РЕЖИМ НЕ ПОДДЕРЖИВ.",
"НЕ ХВАТАЕТ ТОЧНОСТИ",
"ТЕСТ ОСТАНОВЛЕН",
"НЕТ ОТВЕТА ACK",
"ТАЙМИНГ ACK",
"АВАРИЯ ДРАЙВЕРА",
"ОТВЕТЫ ACK СЛИЛИСЬ"
};
constexpr const char *MODE_PREFIX = "РЕЖИМ: ";
constexpr const char *START_RUN = "ГОТОВ К ЗАПУСКУ";
constexpr const char *MENU_FREQUENCY = "ЧАСТОТА ШИМ:";
constexpr const char *MENU_MAX_PULSE = "МАКС. ИМПУЛЬС:";
constexpr const char *MENU_MIN_PULSE = "МИН. ИМПУЛЬС:";
constexpr const char *MENU_ACCURACY = "ТОЧНОСТЬ:";
constexpr const char *MENU_TEST_TIME = "ВРЕМЯ ВЫБОРКИ:";
constexpr const char *MENU_LIGHT_CODE = "АКТ. УРОВЕНЬ:";
constexpr const char *LIGHT_CODE_FORMAT = "TX:%c, RX:%c";
constexpr const char *LIGHT_AUTO = "АВТО";
constexpr const char *LIGHT_AUTO_FORMAT = "TX/RX: АВТО";
constexpr const char *MENU_TOTAL_TIME = "ОБЩЕЕ ВРЕМЯ:";
constexpr const char *FREQUENCY_UNIT = " Гц";
constexpr const char *SLAVE_READY = "СЛЕЙВ ГОТОВ";
constexpr const char *WAIT_MASTER = "ОЖИДАНИЕ МАСТЕРА";
constexpr const char *LINK_FAILED = "СВЯЗЬ НЕ УСТАНОВЛЕНА";
constexpr const char *RADIO_ERROR = "ОШИБКА СВЯЗИ";
constexpr const char *MASTER_SEARCH = "ПОИСК СЛЕЙВА";
constexpr const char *HOLD_START_STOP = "УДЕРЖ. ПУСК ДЛЯ СТОП";
constexpr const char *MASTER_SEEN = "МАСТЕР ОБНАРУЖЕН";
constexpr const char *ACK_SENT = "ОТВЕТ ОТПРАВЛЕН";
constexpr const char *START_AGAIN = "ГОТОВ К ЗАПУСКУ";
constexpr const char *TEST_FAILED = "ТЕСТ НЕ ПРОЙДЕН";
constexpr const char *PASS_WORD = "ТЕСТ ПРОЙДЕН";
constexpr const char *FAIL_FORMAT = "СБОЙ %s";
constexpr const char *TEST_FORMAT = "%s, %s";
constexpr const char *TEST_TARGET_FORMAT = "ТЕСТ: %s";
constexpr const char *FAIL_TARGET_FORMAT = "СБОЙ: %s";
constexpr const char *PERIOD_OUT_FORMAT = "ЧАСТОТА: %s";
constexpr const char *DUTY_OUT_FORMAT = "ИМПУЛЬС: %s";
constexpr const char *NO_MEASUREMENT = "F:---, P:---";
constexpr const char *DRIVER_RESPONSE_FORMAT = "ACK:%lu D:%luns";
constexpr const char *DRIVER_MEASUREMENT_FORMAT = "D: %s, P: %s";
#elif UI_LANGUAGE == UI_LANGUAGE_EN
constexpr const char *ROLE_NAMES[] = {
"SOLO", "MASTER", "SLAVE"
};
constexpr const char *TEST_NAMES[] = {
"OPTICAL", "DRIVER"
};
constexpr const char *FAIL_NAMES[] = {
"NONE",
"NO SIGNAL",
"PERIOD OUT",
"PULSE OUT",
"EXTRA EDGE",
"GLITCH",
"LOST EDGE",
"DATA LOSS ERROR",
"LINK LOST",
"UNSUPPORTED",
"RESOLUTION",
"ABORTED",
"ACK MISSING",
"ACK TIMING",
"DRIVER FAULT",
"ACK MERGED"
};
constexpr const char *MODE_PREFIX = "MODE: ";
constexpr const char *START_RUN = "READY TO START";
constexpr const char *MENU_FREQUENCY = "PWM FREQUENCY:";
constexpr const char *MENU_MAX_PULSE = "MAX PULSE:";
constexpr const char *MENU_MIN_PULSE = "MIN PULSE:";
constexpr const char *MENU_ACCURACY = "ACCURACY:";
constexpr const char *MENU_TEST_TIME = "TEST TIME:";
constexpr const char *MENU_LIGHT_CODE = "ACTIVE LEVEL:";
constexpr const char *LIGHT_CODE_FORMAT = "TX:%c, RX:%c";
constexpr const char *LIGHT_AUTO = "AUTO";
constexpr const char *LIGHT_AUTO_FORMAT = "TX/RX: AUTO";
constexpr const char *MENU_TOTAL_TIME = "TOTAL TIME:";
constexpr const char *FREQUENCY_UNIT = " Hz";
constexpr const char *SLAVE_READY = "SLAVE READY";
constexpr const char *WAIT_MASTER = "WAIT MASTER";
constexpr const char *LINK_FAILED = "LINK FAILED";
constexpr const char *RADIO_ERROR = "RADIO ERROR";
constexpr const char *MASTER_SEARCH = "MASTER SEARCH";
constexpr const char *HOLD_START_STOP = "HOLD START TO STOP";
constexpr const char *MASTER_SEEN = "MASTER SEEN";
constexpr const char *ACK_SENT = "ACK SENT";
constexpr const char *START_AGAIN = "READY TO START";
constexpr const char *TEST_FAILED = "TEST FAILED";
constexpr const char *PASS_WORD = "TEST PASS";
constexpr const char *FAIL_FORMAT = "FAIL %s";
constexpr const char *TEST_FORMAT = "%s, %s";
constexpr const char *TEST_TARGET_FORMAT = "TEST: %s";
constexpr const char *FAIL_TARGET_FORMAT = "FAIL AT %s";
constexpr const char *PERIOD_OUT_FORMAT = "FREQ OUT %s";
constexpr const char *DUTY_OUT_FORMAT = "PULSE OUT %s";
constexpr const char *NO_MEASUREMENT = "F:---, P:---";
constexpr const char *DRIVER_RESPONSE_FORMAT = "ACK:%lu D:%luns";
constexpr const char *DRIVER_MEASUREMENT_FORMAT = "D: %s, P: %s";
#else
#error "UI_LANGUAGE must be UI_LANGUAGE_EN or UI_LANGUAGE_RU"
#endif
} // namespace UiText