Add Jumper t12 support by 3djc (#6451)

* Jumper T12 - companion part

* more work

* Add definitions

* fix libsimulator key handling

* Fix simu keys handling

* Cosmetics

* Continued

* Fix wrong regplace

* Fix wrong regplace

* Please travis

* Please travis

* Add T12 to Travis
Switch naming and display

* Cosmetics

* Work on modules

* Work on modules

* typo

* Fix navigation

* Cosmetics

* Introduce NAVIGATION_type

* Fix

* Make NAVIGATION_type more future proof

* Lots of cleanups and improvements

* Cosmetics

* Fix internal module menu

* Cosmetics

* Fix screen reversed

* Small fixes

* Fix navigation issue

* Please travis

* Fix LCD contrast

* Fix T12 switch layout

* Fix T12 keys screen and all radios keys translations

* Complete rework of SWITCHES screen for all radios

* comsetics

* VC++ compilation
This commit is contained in:
3djc
2019-05-26 19:51:17 +02:00
committed by Andre Bernet
parent f0998ff52f
commit cd3c4ac654
80 changed files with 975 additions and 208 deletions
+19 -40
View File
@@ -38,65 +38,44 @@ void menuRadioDiagKeys(event_t event)
{
SIMPLE_SUBMENU(STR_MENU_RADIO_SWITCHES, 1);
lcdDrawText(14*FW, MENU_HEADER_HEIGHT+2*FH, STR_VTRIM);
lcdDrawText(14*FW, MENU_HEADER_HEIGHT + 1, STR_VTRIM);
for (uint8_t i=0; i<9; i++) {
coord_t y;
if (i < NUM_TRIMS_KEYS) {
y = MENU_HEADER_HEIGHT + FH*3 + FH*(i/2);
y = MENU_HEADER_HEIGHT + 1 + FH + FH*(i/2);
if (i&1) lcdDraw1bitBitmap(14*FW, y, sticks, i/2, 0);
displayKeyState(i&1? 20*FW : 18*FW, y, TRM_BASE+i);
}
if (i < TRM_BASE) {
#if defined(PCBX7) || defined(PCBX9LITE)
y = MENU_HEADER_HEIGHT + FH + FH*i;
if (i >= 2) {
// hide PLUS and MINUS virtual buttons
lcdDrawTextAtIndex(0, y, STR_VKEYS, (TRM_BASE-1-i), 0);
displayKeyState(5*FW+4, y, KEY_MENU+(TRM_BASE-1-i));
}
#elif defined(PCBXLITE)
y = MENU_HEADER_HEIGHT + FH*i;
lcdDrawTextAtIndex(0, y, STR_VKEYS, (TRM_BASE-1-i), 0);
displayKeyState(5*FW+2, y, KEY_SHIFT+(TRM_BASE-1-i));
#else
y = MENU_HEADER_HEIGHT + FH + FH*i;
lcdDrawTextAtIndex(0, y, STR_VKEYS, (TRM_BASE-1-i), 0);
displayKeyState(5*FW+2, y, KEY_MENU+(TRM_BASE-1-i));
#endif
if (i <= KEY_MAX) {
y = MENU_HEADER_HEIGHT + 1 + FH*i;
lcdDrawTextAtIndex(0, y, STR_VKEYS, i, 0);
displayKeyState(5*FW+2, y, i);
}
#if defined(PCBTARANIS)
if (i < NUM_SWITCHES) {
if (SWITCH_EXISTS(i)) {
getvalue_t val = getValue(MIXSRC_FIRST_SWITCH+i);
getvalue_t sw = ((val < 0) ? 3*i+1 : ((val == 0) ? 3*i+2 : 3*i+3));
drawSwitch(8*FW+4, y, sw, 0);
}
}
#else
#if defined(PCBSKY9X)
if (i != SW_ID0) {
y = MENU_HEADER_HEIGHT +i*FH - 2*FH;
drawSwitch(8*FW, y, i+1, 0);
displaySwitchState(11*FW+2, y, i);
}
#else
if (i < NUM_SWITCHES) {
if (SWITCH_EXISTS(i)) {
y = MENU_HEADER_HEIGHT + 1 + FH*i;
getvalue_t val = getValue(MIXSRC_FIRST_SWITCH+i);
getvalue_t sw = ((val < 0) ? 3*i+1 : ((val == 0) ? 3*i+2 : 3*i+3));
drawSwitch(8*FW+4, y, sw, 0);
}
}
#endif
}
#if defined(ROTARY_ENCODER_NAVIGATION)
#if defined(PCBX7) || defined(PCBX9LITE)
coord_t y = MENU_HEADER_HEIGHT + FH;
coord_t x = 6*FW+3;
lcdDrawTextAtIndex(0, MENU_HEADER_HEIGHT + FH , STR_VRENCODERS, 0, 0);
lcdDrawNumber(x, y, rotencValue, RIGHT);
#else
coord_t y = MENU_HEADER_HEIGHT;
coord_t x = 19*FW;
lcdDrawTextAtIndex(14*FW, y, STR_VRENCODERS, 0, 0);
lcdDrawNumber(x, y, rotencValue, LEFT);
coord_t y = MENU_HEADER_HEIGHT + 1 + FH*KEY_COUNT;
lcdDrawText(0, y, STR_ROTARY_ENCODER);
lcdDrawNumber(5*FW+FWNUM+2, y, rotencValue, RIGHT);
#endif
#endif
}