diff --git a/radio/src/gui/128x64/radio_diaganas.cpp b/radio/src/gui/128x64/radio_diaganas.cpp index a7c054df2..b6d86fc29 100644 --- a/radio/src/gui/128x64/radio_diaganas.cpp +++ b/radio/src/gui/128x64/radio_diaganas.cpp @@ -20,9 +20,24 @@ */ #include "opentx.h" +#include "../../hal/adc_driver.h" + +#define HOLDANAVALUEFRAMES 4 /* 4* 50ms = 200 ms update rate */ void menuRadioDiagAnalogs(event_t event) { + static int8_t entryCount = 0; + static uint16_t lastShownAnalogValue[NUM_STICKS+NUM_POTS+NUM_SLIDERS]; + + enum ANAVIEWS{ + ANAVIEW_FIRST, + ANAVIEW_CALIB=ANAVIEW_FIRST, + ANAVIEW_RAWLOWFPS, + ANAVIEW_LAST=ANAVIEW_RAWLOWFPS + }; + + static int viewpage = ANAVIEW_FIRST; + // TODO enum #if defined(TX_CAPACITY_MEASUREMENT) #define ANAS_ITEMS_COUNT 3 @@ -32,25 +47,87 @@ void menuRadioDiagAnalogs(event_t event) #define ANAS_ITEMS_COUNT 1 #endif - SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS, HEADER_LINE+ANAS_ITEMS_COUNT); + switch (event) { + case EVT_KEY_FIRST(KEY_UP): +#if defined(KEYS_GPIO_REG_PAGEDN) + case EVT_KEY_BREAK(KEY_PAGEDN): +#elif defined(NAVIGATION_X7) + case EVT_KEY_BREAK(KEY_PAGE): +#endif + { + if (viewpage == ANAVIEW_LAST) + viewpage = ANAVIEW_FIRST; + else + viewpage++; + if (viewpage == ANAVIEW_RAWLOWFPS) entryCount = 0; + break; + } + + case EVT_KEY_FIRST(KEY_DOWN): +#if defined(KEYS_GPIO_REG_PAGEUP) + case EVT_KEY_BREAK(KEY_PAGEUP): +#elif defined(NAVIGATION_X7) + case EVT_KEY_LONG(KEY_PAGE): +#endif + { + if (viewpage == ANAVIEW_FIRST) + viewpage = ANAVIEW_LAST; + else + viewpage--; + if (viewpage == ANAVIEW_RAWLOWFPS) entryCount = 0; + break; + } + } + + switch (viewpage) { + case (ANAVIEW_CALIB): + SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS_CALIB, + HEADER_LINE+ANAS_ITEMS_COUNT); + break; + case (ANAVIEW_RAWLOWFPS): + SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS_RAWLOWFPS, + HEADER_LINE+ANAS_ITEMS_COUNT); + break; + } coord_t y = MENU_HEADER_HEIGHT + 1; - lcdDrawTextAlignedLeft(y, STICKS_PWM_ENABLED() ? STR_PWM_STICKS_POTS_SLIDERS : STR_STICKS_POTS_SLIDERS); + lcdDrawTextAlignedLeft(y, STICKS_PWM_ENABLED() ? STR_PWM_STICKS_POTS_SLIDERS + : STR_STICKS_POTS_SLIDERS); - for (uint8_t i=0; i HOLDANAVALUEFRAMES) + entryCount = 0; + else + entryCount++; } #if defined(GYRO) diff --git a/radio/src/gui/212x64/radio_diaganas.cpp b/radio/src/gui/212x64/radio_diaganas.cpp index 1b368ed84..141c57cd0 100644 --- a/radio/src/gui/212x64/radio_diaganas.cpp +++ b/radio/src/gui/212x64/radio_diaganas.cpp @@ -20,17 +20,58 @@ */ #include "opentx.h" +#include "../../hal/adc_driver.h" + +#define HOLDANAVALUEFRAMES 4 /* 4* 50ms = 200 ms update rate */ void menuRadioDiagAnalogs(event_t event) { - SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS, 0); + static int8_t entryCount = 0; + static uint16_t lastShownAnalogValue[NUM_STICKS+NUM_POTS+NUM_SLIDERS]; + + enum ANAVIEWS{ + ANAVIEW_FIRST, + ANAVIEW_CALIB=ANAVIEW_FIRST, + ANAVIEW_RAWLOWFPS, + ANAVIEW_LAST=ANAVIEW_RAWLOWFPS + }; + + static int viewpage = ANAVIEW_FIRST; + + if (event == EVT_KEY_BREAK(KEY_PAGE)) { + if (viewpage == ANAVIEW_LAST) + viewpage = ANAVIEW_FIRST; + else + viewpage++; + if (viewpage == ANAVIEW_RAWLOWFPS) + entryCount = 0; + } + + switch (viewpage) + { + case (ANAVIEW_CALIB): SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS_CALIB, 0); break; + case (ANAVIEW_RAWLOWFPS): SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS_RAWLOWFPS, 0); break; + } for (uint8_t i=0; i HOLDANAVALUEFRAMES) + entryCount = 0; + else + entryCount++; + } } diff --git a/radio/src/gui/colorlcd/radio_diaganas.cpp b/radio/src/gui/colorlcd/radio_diaganas.cpp index 37758d878..2571293fc 100644 --- a/radio/src/gui/colorlcd/radio_diaganas.cpp +++ b/radio/src/gui/colorlcd/radio_diaganas.cpp @@ -22,6 +22,7 @@ #include "opentx.h" #include "radio_diaganas.h" #include "libopenui.h" +#include "../../hal/adc_driver.h" #if defined(IMU_LSM6DS33) #include "imu_lsm6ds33.h" @@ -31,11 +32,26 @@ #include "../../targets/horus/flyskyHallStick_driver.h" #endif -constexpr coord_t ANA_OFFSET = 150; +#define STATSDEPTH 8 // ideally a value of power of 2 -class RadioAnalogsDiagsWindow: public Window { +constexpr coord_t CA_X_OFFSET = 70; +constexpr coord_t VALUE_X_OFFSET = 120; +constexpr coord_t DEV_X_OFFSET = 125; +constexpr coord_t MIN_X_OFFSET = 115; +constexpr coord_t MAX_X_OFFSET = 165; +constexpr coord_t RANGE_X_OFFSET = 170; + +RadioAnalogsDiagsViewPageGroup::RadioAnalogsDiagsViewPageGroup() : TabsGroup(ICON_STATS) +{ + addTab(new AnaCalibratedViewPage()); + addTab(new AnaFilteredDevViewPage()); + addTab(new AnaUnfilteredRawViewPage()); + addTab(new AnaMinMaxViewPage()); +} + +class AnaCalibratedViewWindow: public Window { public: - RadioAnalogsDiagsWindow(Window * parent, const rect_t & rect): + AnaCalibratedViewWindow(Window * parent, const rect_t & rect): Window(parent, rect) { } @@ -52,31 +68,31 @@ class RadioAnalogsDiagsWindow: public Window { if (globalData.flyskygimbals) { for (uint8_t i = 0; i < FLYSKY_HALL_CHANNEL_COUNT; i++) { - #if LCD_W > LCD_H - coord_t y = 1 + (i / 2) * FH; - uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; - #else - coord_t y = 1 + i * FH; - uint8_t x = 10; - #endif + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); - dc->drawNumber(x + 3 * 15 - 1, y, hall_raw_values[i], LEFT | COLOR_THEME_PRIMARY1); - dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + VALUE_X_OFFSET, y, hall_raw_values[i], RIGHT | COLOR_THEME_PRIMARY1); } for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { - #if LCD_W > LCD_H - coord_t y = 1 + (i / 2) * FH; - uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; - #else - coord_t y = 1 + i * FH; - uint8_t x = 10; - #endif + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); - dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1); - dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + VALUE_X_OFFSET, y, anaIn(i), RIGHT | COLOR_THEME_PRIMARY1); } } #endif @@ -84,17 +100,17 @@ class RadioAnalogsDiagsWindow: public Window { if (!globalData.flyskygimbals) // Also Simulator { for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { -#if LCD_W > LCD_H - coord_t y = 1 + (i / 2) * FH; - uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; -#else - coord_t y = 1 + i * FH; - uint8_t x = 10; -#endif + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); - dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1); - dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + VALUE_X_OFFSET, y, anaIn(i), RIGHT | COLOR_THEME_PRIMARY1); } } @@ -114,7 +130,7 @@ class RadioAnalogsDiagsWindow: public Window { #if defined(HARDWARE_TOUCH) TouchState rawTouchState = getInternalTouchState(); - constexpr coord_t y = MENU_CONTENT_TOP + 5 * FH; + constexpr coord_t y = MENU_CONTENT_TOP + 4 * FH; if (rawTouchState.event != TE_NONE && rawTouchState.event != TE_SLIDE_END) { coord_t x = dc->drawText(MENUS_MARGIN_LEFT, y, STR_TOUCH_PANEL); @@ -124,34 +140,403 @@ class RadioAnalogsDiagsWindow: public Window { dc->drawLine(rawTouchState.x - 10, rawTouchState.y - 8 - parent->top(), rawTouchState.x + 10, rawTouchState.y + 8 - parent->top(), SOLID, 0); dc->drawLine(rawTouchState.x - 10, rawTouchState.y + 8 - parent->top(), rawTouchState.x + 10, rawTouchState.y - 8- parent->top(), SOLID, 0); } -#if !defined(SIMU) && !defined(PCBNV14) - constexpr coord_t y1 = MENU_CONTENT_TOP + 6 * FH; - coord_t x1 = MENUS_MARGIN_LEFT; - x1 = dc->drawText(x1, y1, "Touch GT911 FW ver:") + 8; - x1 = dc->drawNumber(x1, y1, touchGT911fwver, LEFT, 4) + 16; - x1 = dc->drawText(x1, y1, "TSI2CEvents:") + 4; - dc->drawNumber(x1, y1, touchGT911hiccups, LEFT, 5); -#endif + #if !defined(SIMU) && !defined(PCBNV14) + constexpr coord_t y1 = MENU_CONTENT_TOP + 5 * FH; + coord_t x1 = MENUS_MARGIN_LEFT; + x1 = dc->drawText(x1, y1, "Touch GT911 FW ver:") + 8; + x1 = dc->drawNumber(x1, y1, touchGT911fwver, LEFT, 4) + 16; + x1 = dc->drawText(x1, y1, "TSI2CEvents:") + 4; + dc->drawNumber(x1, y1, touchGT911hiccups, LEFT, 5); + #endif #endif }; protected: }; -void RadioAnalogsDiagsPage::buildHeader(Window * window) +class AnaFilteredDevViewWindow: public Window { + protected: + class Stats { + protected: + int16_t buffer[STATSDEPTH] = {0}; + uint8_t writePos = 0; + uint8_t filledElems = 0; + + int16_t intSqrt(int16_t val) + { + if (val < 0) + return 0; + if (val <= 1) + return val; + + // Try iteratively until i^2 >= val + int i = 1, retval = 1; + while (retval <= val) + { + i++; + retval = i * i; + } + return i - 1; + } + int16_t meanVal() + { + if (filledElems) + { + int sum = 0; + for (uint8_t i=0; i(ret, abs(buffer[i] - meanVal())); + return ret; + } else + return 0; + } + + int16_t stdDev() + { + if (filledElems) + { + int16_t mean=meanVal(); + int calc = 0; + for (uint8_t i=0; i LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + stats[i].write(hall_raw_values[i]); + dc->drawNumber(x + VALUE_X_OFFSET, y, hall_raw_values[i], RIGHT | COLOR_THEME_PRIMARY1); // no need to use calculated mean for FlySky - the output is stable enough to display directly + dc->drawNumber(dc->drawText(x + DEV_X_OFFSET, y, " +/- ", COLOR_THEME_PRIMARY1), y, stats[i].maxDev(), LEFT | COLOR_THEME_PRIMARY1); + } + + for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + stats[i].write(getAnalogValue(i)); + extern uint32_t s_anaFilt[NUM_ANALOGS]; + dc->drawNumber(x + VALUE_X_OFFSET, y, s_anaFilt[i]/JITTER_ALPHA, RIGHT | COLOR_THEME_PRIMARY1); // use integrated filter + dc->drawNumber(dc->drawText(x + DEV_X_OFFSET, y, " +/- ", COLOR_THEME_PRIMARY1), y, stats[i].maxDev(), LEFT | COLOR_THEME_PRIMARY1); + } + } +#endif + + if (!globalData.flyskygimbals) // Also Simulator + { + for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + stats[i].write(getAnalogValue(i)); + #if !defined(SIMU) + extern uint32_t s_anaFilt[NUM_ANALOGS]; + dc->drawNumber(x + VALUE_X_OFFSET, y, s_anaFilt[i]/JITTER_ALPHA, RIGHT | COLOR_THEME_PRIMARY1); // use integrated filter + #else + dc->drawNumber(x + VALUE_X_OFFSET, y, anaIn(i), RIGHT | COLOR_THEME_PRIMARY1); // for simu, can use directly the input values without filtering + #endif + dc->drawNumber(dc->drawText(x + DEV_X_OFFSET, y, " +/- ", COLOR_THEME_PRIMARY1), y, stats[i].maxDev(), LEFT | COLOR_THEME_PRIMARY1); + } + } + }; +}; + +class AnaUnfilteredRawViewWindow: public Window { + public: + AnaUnfilteredRawViewWindow(Window * parent, const rect_t & rect): + Window(parent, rect) + { + } + + void checkEvents() override + { + // will always force a full monitor window refresh + invalidate(); + } + + void paint(BitmapBuffer * dc) override + { +#if !defined(SIMU) && (defined(RADIO_FAMILY_T16) || defined(PCBNV14)) + if (globalData.flyskygimbals) + { + for (uint8_t i = 0; i < FLYSKY_HALL_CHANNEL_COUNT; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + VALUE_X_OFFSET, y, hall_raw_values[i], RIGHT | COLOR_THEME_PRIMARY1); + } + + for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + VALUE_X_OFFSET, y, getAnalogValue(i), RIGHT | COLOR_THEME_PRIMARY1); + } + } +#endif + + if (!globalData.flyskygimbals) // Also Simulator + { + for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + i * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + VALUE_X_OFFSET, y, getAnalogValue(i), RIGHT | COLOR_THEME_PRIMARY1); + } + } + }; + + protected: +}; + +class AnaMinMaxViewWindow: public Window { + protected: + class MinMax { + protected: + bool noElements = true; + int16_t minvalue = INT16_MAX; + int16_t maxvalue = INT16_MIN; + + public: + MinMax() {} + + void clear() + { + minvalue = INT16_MAX; + maxvalue = INT16_MIN; + } + + // Always accept new data, discard old + void write(int16_t value) + { + if (value < minvalue) + minvalue = value; + if (value > maxvalue) + maxvalue = value; + } + + int16_t MinVal() + { + return minvalue; + } + + int16_t MaxVal() + { + return maxvalue; + } + + uint16_t Range() + { + if (maxvalue > minvalue) + return (uint16_t)(maxvalue - minvalue); + else + return 0; + } + }; + bool ClearStats = true; + + public: + AnaMinMaxViewWindow(Window * parent, const rect_t & rect): + Window(parent, rect) {} + + void checkEvents() override + { + // will always force a full monitor window refresh + invalidate(); + } + + void paint(BitmapBuffer * dc) override + { + static MinMax minmax[NUM_STICKS+NUM_POTS+NUM_SLIDERS]; + + if (ClearStats) + { + for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + minmax[i].clear(); + } + ClearStats = false; + } + dc->drawText(10, 1, STR_ANADIAGS_MOVE, COLOR_THEME_PRIMARY1); + +#if !defined(SIMU) && (defined(RADIO_FAMILY_T16) || defined(PCBNV14)) + if (globalData.flyskygimbals) + { + for (uint8_t i = 0; i < FLYSKY_HALL_CHANNEL_COUNT; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2 + 1) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + (i + 1) * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + minmax[i].write(hall_raw_values[i]); + dc->drawNumber(x + MIN_X_OFFSET, y, minmax[i].MinVal(), RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + MAX_X_OFFSET, y, minmax[i].MaxVal(), RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + RANGE_X_OFFSET, y, minmax[i].Range(), LEFT | COLOR_THEME_PRIMARY1); + } + + for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2 + 1) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + (i + 1) * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + minmax[i].write(getAnalogValue(i)); + dc->drawNumber(x + MIN_X_OFFSET, y, minmax[i].MinVal(), RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + MAX_X_OFFSET, y, minmax[i].MaxVal(), RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + RANGE_X_OFFSET, y, minmax[i].Range(), LEFT | COLOR_THEME_PRIMARY1); + } + } +#endif + + if (!globalData.flyskygimbals) // Also Simulator + { + for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) { + #if LCD_W > LCD_H + coord_t y = 1 + (i / 2 + 1) * FH; + uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10; + #else + coord_t y = 1 + (i + 1) * FH; + uint8_t x = 10; + #endif + dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2); + dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1); + dc->drawNumber(x + CA_X_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1); + minmax[i].write(getAnalogValue(i)); + dc->drawNumber(x + MIN_X_OFFSET, y, minmax[i].MinVal(), RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + MAX_X_OFFSET, y, minmax[i].MaxVal(), RIGHT | COLOR_THEME_PRIMARY1); + dc->drawNumber(x + RANGE_X_OFFSET, y, minmax[i].Range(), LEFT | COLOR_THEME_PRIMARY1); + } + } + }; +}; + +void AnaCalibratedViewPage::build(FormWindow *window) { - new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP + 10, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, STR_MENU_RADIO_ANALOGS, 0, COLOR_THEME_PRIMARY2); + new AnaCalibratedViewWindow(window, {10, 10, window->width() - 10, window->height() - 10}); } -void RadioAnalogsDiagsPage::buildBody(Window * window) +void AnaFilteredDevViewPage::build(FormWindow *window) { - new RadioAnalogsDiagsWindow(window, {10, 10, window->width() - 10, window->height() - 10}); + new AnaFilteredDevViewWindow(window, {10, 10, window->width() - 10, window->height() - 10}); } -RadioAnalogsDiagsPage::RadioAnalogsDiagsPage(): - Page(ICON_MODEL_SETUP) +void AnaUnfilteredRawViewPage::build(FormWindow *window) { - buildHeader(&header); - buildBody(&body); - setFocus(SET_FOCUS_DEFAULT); + new AnaUnfilteredRawViewWindow(window, {10, 10, window->width() - 10, window->height() - 10}); +} + +void AnaMinMaxViewPage::build(FormWindow *window) +{ + new AnaMinMaxViewWindow(window, {10, 10, window->width() - 10, window->height() - 10}); } diff --git a/radio/src/gui/colorlcd/radio_diaganas.h b/radio/src/gui/colorlcd/radio_diaganas.h index a29e229e7..a772c86d7 100644 --- a/radio/src/gui/colorlcd/radio_diaganas.h +++ b/radio/src/gui/colorlcd/radio_diaganas.h @@ -19,14 +19,52 @@ * GNU General Public License for more details. */ -#include "page.h" +#pragma once -class RadioAnalogsDiagsPage: public Page { - public: - explicit RadioAnalogsDiagsPage(); +#include "font.h" +#include "opentx.h" +#include "static.h" +#include "tabsgroup.h" +#include "window.h" - protected: - void buildHeader(Window * window); - void buildBody(Window * window); +class RadioAnalogsDiagsViewPageGroup : public TabsGroup +{ + public: + RadioAnalogsDiagsViewPageGroup(); }; +class AnaCalibratedViewPage : public PageTab +{ + public: + AnaCalibratedViewPage() : PageTab(STR_ANADIAGS_CALIB, ICON_STATS_ANALOGS) {} + + protected: + void build(FormWindow* window) override; +}; + +class AnaFilteredDevViewPage : public PageTab +{ + public: + AnaFilteredDevViewPage() : PageTab(STR_ANADIAGS_FILTRAWDEV, ICON_STATS_THROTTLE_GRAPH) {} + + protected: + void build(FormWindow* window) override; +}; + +class AnaUnfilteredRawViewPage : public PageTab +{ + public: + AnaUnfilteredRawViewPage() : PageTab(STR_ANADIAGS_UNFILTRAW, ICON_RADIO_HARDWARE) {} + + protected: + void build(FormWindow* window) override; +}; + +class AnaMinMaxViewPage : public PageTab +{ + public: + AnaMinMaxViewPage() : PageTab(STR_ANADIAGS_MINMAX, ICON_RADIO_CALIBRATION) {} + + protected: + void build(FormWindow* window) override; +}; diff --git a/radio/src/gui/colorlcd/radio_hardware.cpp b/radio/src/gui/colorlcd/radio_hardware.cpp index 2abd41226..72e217bc4 100644 --- a/radio/src/gui/colorlcd/radio_hardware.cpp +++ b/radio/src/gui/colorlcd/radio_hardware.cpp @@ -414,7 +414,7 @@ void RadioHardwarePage::build(FormWindow * window) new StaticText(window, grid.getLabelSlot(), STR_DEBUG, 0, COLOR_THEME_PRIMARY1 | FONT(BOLD)); auto debugAnas = new TextButton(window, grid.getFieldSlot(2, 0), STR_ANALOGS_BTN); debugAnas->setPressHandler([=]() -> uint8_t { - auto debugAnalogsPage = new RadioAnalogsDiagsPage(); + auto debugAnalogsPage = new RadioAnalogsDiagsViewPageGroup(); debugAnalogsPage->setCloseHandler([=]() { calib->setFocus(SET_FOCUS_DEFAULT); }); diff --git a/radio/src/hal/adc_driver.cpp b/radio/src/hal/adc_driver.cpp index a02c3a78b..4ffcfe784 100644 --- a/radio/src/hal/adc_driver.cpp +++ b/radio/src/hal/adc_driver.cpp @@ -197,7 +197,7 @@ uint16_t getAnalogValue(uint8_t index) index = adcMapping[index]; #endif if (adcDirection[index] < 0) - return 4095 - adcValues[index]; + return ADCMAXVALUE - adcValues[index]; else return adcValues[index]; } diff --git a/radio/src/hal/adc_driver.h b/radio/src/hal/adc_driver.h index 51edf6769..8c67af924 100644 --- a/radio/src/hal/adc_driver.h +++ b/radio/src/hal/adc_driver.h @@ -39,6 +39,8 @@ #define NUM_ANALOGS_ADC NUM_ANALOGS #endif +#define ADCMAXVALUE 4095 + // TODO: get rid of this special case #if defined(PCBX10) || defined(PCBX12S) extern uint16_t rtcBatteryVoltage; diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 0e3d1eb26..51ea419fa 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1063,15 +1063,7 @@ JitterMeter avgJitter[NUM_ANALOGS]; tmr10ms_t jitterResetTime = 0; #endif -#define JITTER_FILTER_STRENGTH 4 // tune this value, bigger value - more filtering (range: 1-5) (see explanation below) -#define ANALOG_SCALE 1 // tune this value, bigger value - more filtering (range: 0-1) (see explanation below) - -#define JITTER_ALPHA (1< 32) - #error "JITTER_FILTER_STRENGTH and ANALOG_SCALE are too big, their summ should be <= 5 !!!" -#endif #if !defined(SIMU) uint16_t anaIn(uint8_t chan) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 08e7762ba..d659b1208 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -1261,6 +1261,15 @@ extern Clipboard clipboard; extern uint32_t s_anaFilt[NUM_ANALOGS]; #endif +#define JITTER_FILTER_STRENGTH 4 // tune this value, bigger value - more filtering (range: 1-5) (see explanation below) +#define ANALOG_SCALE 1 // tune this value, bigger value - more filtering (range: 0-1) (see explanation below) + +#define JITTER_ALPHA (1< 32) + #error "JITTER_FILTER_STRENGTH and ANALOG_SCALE are too big, their summ should be <= 5 !!!" +#endif + #if defined(JITTER_MEASURE) extern JitterMeter rawJitter[NUM_ANALOGS]; extern JitterMeter avgJitter[NUM_ANALOGS]; diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 976549a10..06b7e640c 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -250,6 +250,8 @@ const char STR_MENUSPECIALFUNCS[] = TR_MENUSPECIALFUNCS; const char STR_MENUVERSION[] = TR_MENUVERSION; const char STR_MENU_RADIO_SWITCHES[] = TR_MENU_RADIO_SWITCHES; const char STR_MENU_RADIO_ANALOGS[] = TR_MENU_RADIO_ANALOGS; +const char STR_MENU_RADIO_ANALOGS_CALIB[] = TR_MENU_RADIO_ANALOGS_CALIB; +const char STR_MENU_RADIO_ANALOGS_RAWLOWFPS[] = TR_MENU_RADIO_ANALOGS_RAWLOWFPS; const char STR_MENUCALIBRATION[] = TR_MENUCALIBRATION; const char STR_MENUMODELSEL[] = TR_MENUMODELSEL; const char STR_MENU_MODEL_SETUP[] = TR_MENU_MODEL_SETUP; @@ -313,6 +315,11 @@ const char STR_DISABLE_INTERNAL[] = TR_DISABLE_INTERNAL; const char STR_AND_SWITCH[] = TR_AND_SWITCH; const char STR_SF[] = TR_SF; const char STR_GF[] = TR_GF; +const char STR_ANADIAGS_CALIB[] = TR_ANADIAGS_CALIB; +const char STR_ANADIAGS_FILTRAWDEV[] = TR_ANADIAGS_FILTRAWDEV; +const char STR_ANADIAGS_UNFILTRAW[] = TR_ANADIAGS_UNFILTRAW; +const char STR_ANADIAGS_MINMAX[] = TR_ANADIAGS_MINMAX; +const char STR_ANADIAGS_MOVE[] = TR_ANADIAGS_MOVE; const char STR_BATT_CALIB[] = TR_BATT_CALIB; const char STR_VOLTAGE[] = TR_VOLTAGE; const char STR_CURRENT_CALIB[] = TR_CURRENT_CALIB; diff --git a/radio/src/translations.h b/radio/src/translations.h index f8be81cb5..6e06cf1cd 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -407,6 +407,8 @@ extern const char STR_MENUSPECIALFUNCS[]; extern const char STR_MENUVERSION[]; extern const char STR_MENU_RADIO_SWITCHES[]; extern const char STR_MENU_RADIO_ANALOGS[]; +extern const char STR_MENU_RADIO_ANALOGS_CALIB[]; +extern const char STR_MENU_RADIO_ANALOGS_RAWLOWFPS[]; extern const char STR_MENUCALIBRATION[]; extern const char STR_MENUMODELSEL[]; extern const char STR_MENU_MODEL_SETUP[]; @@ -433,7 +435,11 @@ extern const char STR_MENU_GLOBAL_VARS[]; extern const char STR_AND_SWITCH[]; extern const char STR_SF[]; extern const char STR_GF[]; - +extern const char STR_ANADIAGS_CALIB[]; +extern const char STR_ANADIAGS_FILTRAWDEV[]; +extern const char STR_ANADIAGS_UNFILTRAW[]; +extern const char STR_ANADIAGS_MINMAX[]; +extern const char STR_ANADIAGS_MOVE[]; extern const char STR_MULTI_CUSTOM[]; extern const char STR_MULTI_FIXEDID[]; extern const char STR_MULTI_OPTION[]; diff --git a/radio/src/translations/cn.h.txt b/radio/src/translations/cn.h.txt index 9aad80d20..81e442d40 100644 --- a/radio/src/translations/cn.h.txt +++ b/radio/src/translations/cn.h.txt @@ -550,6 +550,8 @@ #define TR_MENUVERSION "版本" #define TR_MENU_RADIO_SWITCHES TR("SWITCHES", "开关及按键测试") #define TR_MENU_RADIO_ANALOGS TR("ANALOGS", "类比输入测试") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "校准" #define TR_TRIMS2OFFSETS "将当前微调量保存至中点" #define TR_CHANNELS2FAILSAFE "导入当前所有通道值" @@ -874,6 +876,11 @@ #define TR_AND_SWITCH "与开关" #define TR_SF "SF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "扬声器" #define TR_BUZZER INDENT "蜂鸣器" #define TR_BYTES "bytes" diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 6bea2d206..c53674849 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -610,6 +610,8 @@ #define TR_MENUVERSION "VERZE" #define TR_MENU_RADIO_SWITCHES "DIAG" #define TR_MENU_RADIO_ANALOGS "ANALOGY" +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "KALIBRACE" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trimy => Subtrimy" @@ -935,6 +937,11 @@ #define TR_AND_SWITCH "AND Spínač" #define TR_SF "SF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT"Repro" #define TR_BUZZER INDENT"Pípák" #define TR_BYTES "[B]" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index 2fef53b50..4d1b26468 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -615,6 +615,8 @@ #define TR_MENUVERSION "VERSION" #define TR_MENU_RADIO_SWITCHES TR("Schalter-Test", "Schalter-Test") #define TR_MENU_RADIO_ANALOGS "Geber-Test" +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION TR("KALIB. ANALOG", "KALIBRIERUNG-Analog") #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Subtrims" @@ -937,6 +939,11 @@ #define TR_AND_SWITCH "UND Schalt" //UND mit weiterem Schaltern #define TR_SF "SF" //Spezial Funktionen #define TR_GF "GF" // Globale Funktionen +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "Lautspr" #define TR_BUZZER INDENT "Summer" #define TR_BYTES "Bytes" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt index d74d42712..2be66cbab 100644 --- a/radio/src/translations/en.h.txt +++ b/radio/src/translations/en.h.txt @@ -613,6 +613,8 @@ #define TR_MENUVERSION "VERSION" #define TR_MENU_RADIO_SWITCHES TR("SWITCHES", "SWITCHES TEST") #define TR_MENU_RADIO_ANALOGS TR("ANALOGS", "ANALOGS TEST") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "CALIBRATION" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Subtrims" @@ -942,6 +944,11 @@ #define TR_AND_SWITCH "AND switch" #define TR_SF "SF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "Speaker" #define TR_BUZZER INDENT "Buzzer" #define TR_BYTES "bytes" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index 7353c7f8e..527cf254c 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -606,6 +606,8 @@ #define TR_MENUVERSION "VERSIÓN" #define TR_MENU_RADIO_SWITCHES TR("INTERUPTS", "TEST INTERRUPTORES") #define TR_MENU_RADIO_ANALOGS TR("ANALÓGICOS", "TEST ANALÓGICOS") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "CALIBRACIÓN" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Offsets" @@ -939,6 +941,11 @@ #define TR_AND_SWITCH TR("Inter. AND", "Interruptor AND") #define TR_SF "CF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT"Altavoz" #define TR_BUZZER INDENT"Zumbador" #define TR_BYTES "bytes" diff --git a/radio/src/translations/fi.h.txt b/radio/src/translations/fi.h.txt index 99a28b1f6..dddd4f33d 100644 --- a/radio/src/translations/fi.h.txt +++ b/radio/src/translations/fi.h.txt @@ -621,6 +621,8 @@ #define TR_MENUVERSION "VERSION" #define TR_MENU_RADIO_SWITCHES TR("SWITCHES","SWITCH TEST") #define TR_MENU_RADIO_ANALOGS TR("ANAS","ANALOG INPUTS") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "CALIBRATION" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Subtrims" @@ -953,6 +955,11 @@ #define TR_AND_SWITCH "AND Switch" #define TR_SF "CF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT"Speaker" #define TR_BUZZER INDENT"Buzzer" #define TR_BYTES "bytes" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 58f82408b..71fa43c65 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -635,6 +635,8 @@ #define TR_MENUVERSION "VERSION" #define TR_MENU_RADIO_SWITCHES TR("INTERS", "TEST INTERRUPTEURS") #define TR_MENU_RADIO_ANALOGS TR("ANAS", "ENTREES ANALOGIQUES") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "CALIBRATION" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Subtrims" @@ -958,6 +960,11 @@ #define TR_AND_SWITCH "ET suppl." #define TR_SF "FS" #define TR_GF "FG" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "Haut-p." #define TR_BUZZER INDENT "Bipeur" #define TR_BYTES "bytes" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index ba66fe684..fa4c60cab 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -635,6 +635,8 @@ #define TR_MENUVERSION "VERSIONE" #define TR_MENU_RADIO_SWITCHES "DIAG" #define TR_MENU_RADIO_ANALOGS "ANAS" +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "CALIBRAZIONE" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Subtrims" @@ -959,6 +961,11 @@ #define TR_AND_SWITCH "Inter. AND" #define TR_SF "CF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "Speaker" #define TR_BUZZER INDENT "Buzzer" #define TR_BYTES "Bytes" diff --git a/radio/src/translations/nl.h.txt b/radio/src/translations/nl.h.txt index fe8206a70..d68093d29 100644 --- a/radio/src/translations/nl.h.txt +++ b/radio/src/translations/nl.h.txt @@ -620,6 +620,8 @@ #define TR_MENUVERSION "VERSIE" #define TR_MENU_RADIO_SWITCHES TR("Schak.", "Schakelaar-Test") #define TR_MENU_RADIO_ANALOGS "Analoog-Test" +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION TR("CALIB. ANALOOG", "CALIBRERING Sticks+Pots") #if defined(COLORLCD) @@ -945,6 +947,11 @@ #define TR_AND_SWITCH "AND Switch" #define TR_SF "SF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "Speaker" #define TR_BUZZER INDENT "Zoemer" #define TR_BYTES "bytes" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index ede2d1b5f..6028c5416 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -632,6 +632,8 @@ #define TR_MENUVERSION "WERSJA" #define TR_MENU_RADIO_SWITCHES TR("PRZEŁ","TEST PRZEŁ") #define TR_MENU_RADIO_ANALOGS TR("WE-ANA","WEJŚCIA ANALOG.") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "KALIBRACJA" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trymery => Subtrimy" @@ -956,6 +958,11 @@ #define TR_AND_SWITCH "Przełącznik AND" #define TR_SF "FS" #define TR_GF "FG" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT"Głośnik" #define TR_BUZZER INDENT"Brzęczyk" #define TR_BYTES "bajty" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index fc628d97b..31aab6607 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -632,6 +632,8 @@ #define TR_MENUVERSION "VERSAO" #define TR_MENU_RADIO_SWITCHES "DIAGNOST" #define TR_MENU_RADIO_ANALOGS "ANALOGICOS" +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "CALIBRAGEM" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "Trims => Subtrims" @@ -964,6 +966,11 @@ #define TR_AND_SWITCH "AND Switch" #define TR_SF "CF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT"Speaker" #define TR_BUZZER INDENT"Buzzer" #define TR_BYTES "bytes" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index 77896e159..317b048c2 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -639,6 +639,8 @@ #define TR_MENUVERSION "VERSION" #define TR_MENU_RADIO_SWITCHES TR("BRYTARE","TEST AV BRYTARE") #define TR_MENU_RADIO_ANALOGS "ANALOGA VÄRDEN" +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "KALIBRERING" #if defined(COLORLCD) #define TR_TRIMS2OFFSETS "[Spara Trimvärden]" @@ -964,6 +966,11 @@ #define TR_AND_SWITCH "OCH Brytare" #define TR_SF "BF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT"Högtalare" #define TR_BUZZER INDENT"Summer" #define TR_BYTES "byte" diff --git a/radio/src/translations/tw.h.txt b/radio/src/translations/tw.h.txt index f4ec6c45f..149ee2bfd 100644 --- a/radio/src/translations/tw.h.txt +++ b/radio/src/translations/tw.h.txt @@ -550,6 +550,8 @@ #define TR_MENUVERSION "版本" #define TR_MENU_RADIO_SWITCHES TR("SWITCHES", "開關及按鍵測試") #define TR_MENU_RADIO_ANALOGS TR("ANALOGS", "類比輸入測試") +#define TR_MENU_RADIO_ANALOGS_CALIB "CALIBRATED ANALOGS" +#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RAW ANALOGS (5 Hz)" #define TR_MENUCALIBRATION "校準" #define TR_TRIMS2OFFSETS "將當前微調量保存至中點" #define TR_CHANNELS2FAILSAFE "導入當前所有通道值" @@ -874,6 +876,11 @@ #define TR_AND_SWITCH "與開關" #define TR_SF "SF" #define TR_GF "GF" +#define TR_ANADIAGS_CALIB "Calibrated analogs" +#define TR_ANADIAGS_FILTRAWDEV "Filtered raw analogs with deviation" +#define TR_ANADIAGS_UNFILTRAW "Unfiltered raw analogs" +#define TR_ANADIAGS_MINMAX "Min., max. and range" +#define TR_ANADIAGS_MOVE "Move analogs to their extremes!" #define TR_SPEAKER INDENT "揚聲器" #define TR_BUZZER INDENT "蜂鳴器" #define TR_BYTES "bytes"