5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
23 void menuRadioDiagAnalogs(event_t event
)
25 SIMPLE_MENU(STR_MENU_RADIO_ANALOGS
, menuTabGeneral
, MENU_RADIO_ANALOGS_TEST
, 0);
27 STICK_SCROLL_DISABLE();
29 for (uint8_t i
=0; i
<NUM_STICKS
+NUM_POTS
+NUM_SLIDERS
; i
++) {
30 coord_t y
= MENU_HEADER_HEIGHT
+ 1 + (i
/2)*FH
;
31 uint8_t x
= i
&1 ? LCD_W
/2 + FW
: 0;
32 lcdDrawNumber(x
, y
, i
+1, LEADING0
|LEFT
, 2);
33 lcdDrawChar(x
+2*FW
-2, y
, ':');
34 lcdDrawHexNumber(x
+3*FW
-1, y
, anaIn(i
));
35 #if defined(JITTER_MEASURE)
36 lcdDrawNumber(x
+10*FW
-1, y
, rawJitter
[i
].get(), RIGHT
);
37 lcdDrawNumber(x
+13*FW
-1, y
, avgJitter
[i
].get(), RIGHT
);
38 lcdDrawNumber(x
+17*FW
-1, y
, (int16_t)calibratedAnalogs
[CONVERT_MODE(i
)]*25/256, RIGHT
);
40 lcdDrawNumber(x
+10*FW
-1, y
, (int16_t)calibratedAnalogs
[CONVERT_MODE(i
)]*25/256, RIGHT
);
45 if((IS_MODULE_XJT(INTERNAL_MODULE
) && IS_INTERNAL_MODULE_ON()) || (IS_MODULE_PXX(EXTERNAL_MODULE
) && !IS_INTERNAL_MODULE_ON())) {
46 lcdDrawTextAlignedLeft(MENU_HEADER_HEIGHT
+6*FH
, "RAS");
47 lcdDrawNumber(10*FW
-1, MENU_HEADER_HEIGHT
+6*FH
, telemetryData
.swr
.value
, RIGHT
);
48 lcdDrawText(LCD_W
/2, MENU_HEADER_HEIGHT
+6*FH
, "XJTVER");
49 lcdDrawNumber(LCD_W
/2 + 10*FW
-1, MENU_HEADER_HEIGHT
+6*FH
, telemetryData
.xjtVersion
, RIGHT
);