/* * 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 * - 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 displayFlightModes(coord_t x, coord_t y, FlightModesType value) { lcd_puts(x, y, STR_FP); x = lcdNextPos + 1; for (uint8_t p=0; p 0) { posHorz += 1; } if (sub=0) { displayColumnHeader(STR_PHASES_HEADERS, posHorz); } for (uint8_t i=0; i0) ? BLINK|INVERS : INVERS) : 0); uint8_t active = (attr && s_editMode>0) ; switch (j) { case ITEM_FLIGHT_MODES_NAME: editName(4*FW-1, y, p->name, sizeof(p->name), event, attr); break; case ITEM_FLIGHT_MODES_SWITCH: putsSwitches((5+LEN_FLIGHT_MODE_NAME)*FW+FW/2, y, p->swtch, attr); if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, SWSRC_FIRST_IN_MIXES, SWSRC_LAST_IN_MIXES, isSwitchAvailableInMixes); break; case ITEM_FLIGHT_MODES_TRIM_RUD: case ITEM_FLIGHT_MODES_TRIM_ELE: case ITEM_FLIGHT_MODES_TRIM_THR: case ITEM_FLIGHT_MODES_TRIM_AIL: { uint8_t t = j-ITEM_FLIGHT_MODES_TRIM_RUD; putsTrimMode((4+LEN_FLIGHT_MODE_NAME)*FW+j*(5*FW/2), y, k, t, attr); if (active) { trim_t & v = p->trim[t]; v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, k==0 ? 0 : 2*MAX_FLIGHT_MODES-1, EE_MODEL, isTrimModeAvailable); } break; } case ITEM_FLIGHT_MODES_FADE_IN: lcd_outdezAtt(32*FW-2, y, (10/DELAY_STEP)*p->fadeIn, attr|PREC1); if (active) p->fadeIn = checkIncDec(event, p->fadeIn, 0, DELAY_MAX, EE_MODEL|NO_INCDEC_MARKS); break; case ITEM_FLIGHT_MODES_FADE_OUT: lcd_outdezAtt(35*FW, y, (10/DELAY_STEP)*p->fadeOut, attr|PREC1); if (active) p->fadeOut = checkIncDec(event, p->fadeOut, 0, DELAY_MAX, EE_MODEL|NO_INCDEC_MARKS); break; } } } }