/* * Authors (alphabetical order) * - Andre Bernet * - Andreas Weitl * - Bertrand Songis * - Bryan J. Rentoul (Gruvin) * - Cameron Weeks * - Erez Raviv * - Gabriel Birkus * - Jean-Pierre Parisy * - Karl Szmutny * - Michael Blandford * - Michal Hlavinka * - Pat Mackenzie * - Philip Moss * - Rob Thomson * - Romolo Manfredini * - Thomas Husterer * * opentx is based on code named * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, * er9x by Erez Raviv: http://code.google.com/p/er9x/, * and the original (and ongoing) project by * Thomas Husterer, th9x: http://code.google.com/p/th9x/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "../opentx.h" void displayKeyState(uint8_t x, uint8_t y, EnumKeys key) { uint8_t t = switchState(key); lcd_putcAtt(x, y, t+'0', t ? INVERS : 0); } void menuGeneralDiagKeys(uint8_t event) { SIMPLE_MENU(STR_MENUDIAG, menuTabGeneral, e_Keys, 1); lcd_puts(14*FW, MENU_TITLE_HEIGHT+2*FH, STR_VTRIM); for(uint8_t i=0; i<9; i++) { coord_t y; if (i<8) { y = MENU_TITLE_HEIGHT + FH*3 + FH*(i/2); if (i&1) lcd_img(14*FW, y, sticks, i/2, 0); displayKeyState(i&1? 20*FW : 18*FW, y, (EnumKeys)(TRM_BASE+i)); } if (i<6) { y = i*FH+MENU_TITLE_HEIGHT+FH; lcd_putsiAtt(0, y, STR_VKEYS, (5-i), 0); displayKeyState(5*FW+2, y, (EnumKeys)(KEY_MENU+(5-i))); } #if !defined(PCBTARANIS) if (i != SW_ID0-SW_BASE) { y = MENU_TITLE_HEIGHT+i*FH-2*FH; putsSwitches(8*FW, y, i+1, 0); //ohne off,on displayKeyState(11*FW+2, y, (EnumKeys)(SW_BASE+i)); } #endif } #if defined(ROTARY_ENCODERS) || defined(ROTARY_ENCODER_NAVIGATION) for(uint8_t i=0; i