[Taranis X9E] Makefile option "SHUTDOWN_CONFIRMATION=YES/NO" added

This commit is contained in:
bsongis
2015-07-11 17:21:20 +02:00
parent ede587f2e1
commit 1f665561eb
6 changed files with 243 additions and 237 deletions
+220 -219
View File
@@ -1119,7 +1119,7 @@ void addOpenTxLcdOptions(OpenTxFirmware * firmware)
void registerOpenTxFirmwares() void registerOpenTxFirmwares()
{ {
OpenTxFirmware * openTx; OpenTxFirmware * firmware;
Option ext_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "telemetrez", QObject::tr("Support for telemetry easy board"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } }; Option ext_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "telemetrez", QObject::tr("Support for telemetry easy board"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } };
Option extr_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } }; Option extr_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } };
@@ -1127,244 +1127,245 @@ void registerOpenTxFirmwares()
Option dsm2_options[] = { { "DSM2", QObject::tr("Support for DSM2 modules"), 0 }, { "DSM2PPM", QObject::tr("Support for DSM2 modules using ppm instead of true serial"), 0 }, { NULL } }; Option dsm2_options[] = { { "DSM2", QObject::tr("Support for DSM2 modules"), 0 }, { "DSM2PPM", QObject::tr("Support for DSM2 modules using ppm instead of true serial"), 0 }, { NULL } };
/* 9x board */ /* 9x board */
openTx = new OpenTxFirmware("opentx-9x", QObject::tr("OpenTX for 9X board"), BOARD_STOCK); firmware = new OpenTxFirmware("opentx-9x", QObject::tr("OpenTX for 9X board"), BOARD_STOCK);
openTx->addOptions(ext_options); firmware->addOptions(ext_options);
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nosplash", QObject::tr("No splash screen")); firmware->addOption("nosplash", QObject::tr("No splash screen"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker")); firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode")); firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode")); firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol")); // NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules")); firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOptions(nav_options); firmware->addOptions(nav_options);
openTx->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support")); firmware->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time")); firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics")); firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
openTx->addOption("pgbar", QObject::tr("EEprom write progress bar")); firmware->addOption("pgbar", QObject::tr("EEprom write progress bar"));
openTx->addOption("imperial", QObject::tr("Imperial units")); firmware->addOption("imperial", QObject::tr("Imperial units"));
openTx->addOption("nowshh", QObject::tr("No Winged Shadow How High support")); firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
openTx->addOption("novario", QObject::tr("No vario support")); firmware->addOption("novario", QObject::tr("No vario support"));
openTx->addOption("nogps", QObject::tr("No GPS support")); firmware->addOption("nogps", QObject::tr("No GPS support"));
openTx->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen")); firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
openTx->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors")); firmware->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
openTx->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)")); firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* 9x board with M128 chip */ /* 9x board with M128 chip */
openTx = new OpenTxFirmware("opentx-9x128", QObject::tr("OpenTX for M128 / 9X board"), BOARD_M128); firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("OpenTX for M128 / 9X board"), BOARD_M128);
openTx->addOptions(ext_options); firmware->addOptions(ext_options);
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nosplash", QObject::tr("No splash screen")); firmware->addOption("nosplash", QObject::tr("No splash screen"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker")); firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode")); firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode")); firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol")); // NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules")); firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOptions(nav_options); firmware->addOptions(nav_options);
openTx->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support")); firmware->addOption("sp22", QObject::tr("SmartieParts 2.2 Backlight support"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time")); firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics")); firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar")); firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
openTx->addOption("imperial", QObject::tr("Imperial units")); firmware->addOption("imperial", QObject::tr("Imperial units"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* 9XR board */ /* 9XR board */
openTx = new OpenTxFirmware("opentx-9xr", QObject::tr("OpenTX for 9XR"), BOARD_STOCK); firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("OpenTX for 9XR"), BOARD_STOCK);
openTx->addOptions(extr_options); firmware->addOptions(extr_options);
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nosplash", QObject::tr("No splash screen")); firmware->addOption("nosplash", QObject::tr("No splash screen"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker")); firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode")); firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode")); firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol")); // NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules")); firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation")); firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics")); firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar")); firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
openTx->addOption("imperial", QObject::tr("Imperial units")); firmware->addOption("imperial", QObject::tr("Imperial units"));
openTx->addOption("nowshh", QObject::tr("No Winged Shadow How High support")); firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
openTx->addOption("novario", QObject::tr("No vario support")); firmware->addOption("novario", QObject::tr("No vario support"));
openTx->addOption("nogps", QObject::tr("No GPS support")); firmware->addOption("nogps", QObject::tr("No GPS support"));
openTx->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen")); firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
openTx->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)")); firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* 9XR board with M128 chip */ /* 9XR board with M128 chip */
openTx = new OpenTxFirmware("opentx-9xr128", QObject::tr("OpenTX for 9XR with M128 chip"), BOARD_M128); firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("OpenTX for 9XR with M128 chip"), BOARD_M128);
openTx->addOptions(extr_options); firmware->addOptions(extr_options);
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nosplash", QObject::tr("No splash screen")); firmware->addOption("nosplash", QObject::tr("No splash screen"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker")); firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode")); firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode")); firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol")); // NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
openTx->addOption("DSM2", QObject::tr("Support for DSM2 modules")); firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation")); firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics")); firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar")); firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
openTx->addOption("imperial", QObject::tr("Imperial units")); firmware->addOption("imperial", QObject::tr("Imperial units"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* Gruvin9x board */ /* Gruvin9x board */
openTx = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("OpenTX for Gruvin9x board / 9X"), BOARD_GRUVIN9X); firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("OpenTX for Gruvin9x board / 9X"), BOARD_GRUVIN9X);
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("sdcard", QObject::tr("Support for SD memory card")); firmware->addOption("sdcard", QObject::tr("Support for SD memory card"));
openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode")); firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol")); firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
openTx->addOptions(dsm2_options); firmware->addOptions(dsm2_options);
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation")); firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time")); firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar")); firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
openTx->addOption("imperial", QObject::tr("Imperial units")); firmware->addOption("imperial", QObject::tr("Imperial units"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* MEGA2560 board */ /* MEGA2560 board */
openTx = new OpenTxFirmware("opentx-mega2560", QObject::tr("OpenTX for MEGA2560 board"), BOARD_MEGA2560); firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("OpenTX for MEGA2560 board"), BOARD_MEGA2560);
addOpenTxLcdOptions(openTx); addOpenTxLcdOptions(firmware);
openTx->addOption("PWR", QObject::tr("Power management by soft-off circuitry")); firmware->addOption("PWR", QObject::tr("Power management by soft-off circuitry"));
openTx->addOptions(ext_options); firmware->addOptions(ext_options);
openTx->addOption("PXX", QObject::tr("Support of FrSky PXX protocol")); firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
openTx->addOptions(dsm2_options); firmware->addOptions(dsm2_options);
openTx->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("sdcard", QObject::tr("Support for SD memory card")); firmware->addOption("sdcard", QObject::tr("Support for SD memory card"));
//openTx->addOption("audio", QObject::tr("Support for radio modified with regular speaker")); //firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
//openTx->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode")); //firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
openTx->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode")); firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views")); firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time")); firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("pgbar", QObject::tr("EEprom write Progress bar")); firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
openTx->addOption("imperial", QObject::tr("Imperial units")); firmware->addOption("imperial", QObject::tr("Imperial units"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* Sky9x board */ /* Sky9x board */
openTx = new OpenTxFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), BOARD_SKY9X); firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), BOARD_SKY9X);
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation")); firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time")); firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface")); firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* 9XR-Pro */ /* 9XR-Pro */
openTx = new OpenTxFirmware("opentx-9xrpro", QObject::tr("OpenTX for 9XR-PRO"), BOARD_9XRPRO); firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("OpenTX for 9XR-PRO"), BOARD_9XRPRO);
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support")); firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu")); firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
openTx->addOption("nofp", QObject::tr("No flight modes")); firmware->addOption("nofp", QObject::tr("No flight modes"));
openTx->addOption("nocurves", QObject::tr("Disable curves menus")); firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits")); firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT); firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
openTx->addOption("symlimits", QObject::tr("Symetrical Limits")); firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation")); firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control")); firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control")); firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders")); firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
openTx->addOption("battgraph", QObject::tr("Battery graph")); firmware->addOption("battgraph", QObject::tr("Battery graph"));
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items")); firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface")); firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* Taranis board */ /* Taranis board */
openTx = new OpenTxFirmware("opentx-taranis", QObject::tr("OpenTX for FrSky Taranis"), BOARD_TARANIS); firmware = new OpenTxFirmware("opentx-taranis", QObject::tr("OpenTX for FrSky Taranis"), BOARD_TARANIS);
openTx->addOption("haptic", QObject::tr("Haptic module installed")); firmware->addOption("haptic", QObject::tr("Haptic module installed"));
addOpenTxTaranisOptions(openTx); addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* Taranis Plus board */ /* Taranis Plus board */
openTx = new OpenTxFirmware("opentx-taranisplus", QObject::tr("OpenTX for FrSky Taranis Plus"), BOARD_TARANIS_PLUS); firmware = new OpenTxFirmware("opentx-taranisplus", QObject::tr("OpenTX for FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
addOpenTxTaranisOptions(openTx); addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(openTx); firmwares.push_back(firmware);
/* Taranis X9E board */ /* Taranis X9E board */
openTx = new OpenTxFirmware("opentx-taranisx9e", QObject::tr("OpenTX for FrSky Taranis X9E"), BOARD_TARANIS_X9E); firmware = new OpenTxFirmware("opentx-taranisx9e", QObject::tr("OpenTX for FrSky Taranis X9E"), BOARD_TARANIS_X9E);
addOpenTxTaranisOptions(openTx); firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
addOpenTxCommonOptions(openTx); addOpenTxTaranisOptions(firmware);
firmwares.push_back(openTx); addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
default_firmware_variant = GetFirmware("opentx-taranisplus-en"); default_firmware_variant = GetFirmware("opentx-taranisplus-en");
current_firmware_variant = default_firmware_variant; current_firmware_variant = default_firmware_variant;
+8
View File
@@ -257,6 +257,10 @@ DEFAULT_MODE = NO
# Values = YES, NO # Values = YES, NO
EEPROM_PROGRESS_BAR = NO EEPROM_PROGRESS_BAR = NO
# Shutdown confirmation (for boards which have soft power)
# Values = NO, YES
SHUTDOWN_CONFIRMATION = NO
# Activates the DEBUG Mode (all boards) # Activates the DEBUG Mode (all boards)
# On G9X V4 board, when VOICE=NO: # On G9X V4 board, when VOICE=NO:
# PORTH:7 --> Transition LOW to HIGH = start of setupPulses(). Transition HIGH to LOW = end of setupPulses(). # PORTH:7 --> Transition LOW to HIGH = start of setupPulses(). Transition HIGH to LOW = end of setupPulses().
@@ -1286,6 +1290,10 @@ ifeq ($(EEPROM_PROGRESS_BAR), YES)
CPPDEFS += -DEEPROM_PROGRESS_BAR CPPDEFS += -DEEPROM_PROGRESS_BAR
endif endif
ifeq ($(SHUTDOWN_CONFIRMATION), YES)
CPPDEFS += -DSHUTDOWN_CONFIRMATION
endif
RUN_FROM_FLASH = 1 RUN_FROM_FLASH = 1
### Global Build-Option Directives ### ### Global Build-Option Directives ###
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

-3
View File
@@ -53,9 +53,6 @@ void displayScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uint16_t
void displayMenuBar(const MenuItem *menu, int index); void displayMenuBar(const MenuItem *menu, int index);
void displayProgressBar(const char *label); void displayProgressBar(const char *label);
void updateProgressBar(int num, int den); void updateProgressBar(int num, int den);
#if defined(REV9E)
void displayShutdownProgress(uint32_t progress);
#endif
extern coord_t scrollbar_X; extern coord_t scrollbar_X;
#define SET_SCROLLBAR_X(x) scrollbar_X = (x); #define SET_SCROLLBAR_X(x) scrollbar_X = (x);
-13
View File
@@ -63,19 +63,6 @@ void menu_lcd_onoff(coord_t x, coord_t y, uint8_t value, LcdFlags attr)
lcd_square(x, y, 7); lcd_square(x, y, 7);
} }
#if defined(REV9E)
void displayShutdownProgress(uint32_t progress)
{
lcd_clear();
lcd_putsLeft(LCD_H/2-20, STR_POWEROFF);
drawFilledRect((LCD_W-44)/2, LCD_H/2-5, 28, 10, SOLID, ERASE);
lcd_rect((LCD_W-44)/2, LCD_H/2-5, 28, 10);
for (int i=(progress/100); i>=0; i--) {
drawFilledRect((LCD_W-44)/2+3+i*8, LCD_H/2-3, 6, 6, SOLID);
}
}
#endif
void displayScreenIndex(uint8_t index, uint8_t count, uint8_t attr) void displayScreenIndex(uint8_t index, uint8_t count, uint8_t attr)
{ {
lcd_outdezAtt(LCD_W, 0, count, attr); lcd_outdezAtt(LCD_W, 0, count, attr);
+15 -2
View File
@@ -2599,6 +2599,12 @@ int main(void)
#endif // !SIMU #endif // !SIMU
#if defined(PCBTARANIS) && defined(REV9E) #if defined(PCBTARANIS) && defined(REV9E)
#define PWR_PRESS_SHUTDOWN 300 // 3s
const pm_uchar bmp_shutdown[] PROGMEM = {
#include "../../bitmaps/Taranis/shutdown.lbm"
};
uint32_t pwr_press_time = 0; uint32_t pwr_press_time = 0;
uint32_t pwrPressedDuration() uint32_t pwrPressedDuration()
@@ -2632,7 +2638,8 @@ uint32_t pwrCheck()
pwr_press_time = get_tmr10ms(); pwr_press_time = get_tmr10ms();
} }
else { else {
if (get_tmr10ms() - pwr_press_time > 300) { if (get_tmr10ms() - pwr_press_time > PWR_PRESS_SHUTDOWN) {
#if defined(SHUTDOWN_CONFIRMATION)
while (1) { while (1) {
lcdRefreshWait(); lcdRefreshWait();
lcd_clear(); lcd_clear();
@@ -2650,10 +2657,16 @@ uint32_t pwrCheck()
return e_power_on; return e_power_on;
} }
} }
#else
pwr_check_state = PWR_CHECK_OFF;
return e_power_off;
#endif
} }
else { else {
lcdRefreshWait(); lcdRefreshWait();
displayShutdownProgress(pwrPressedDuration()); unsigned index = pwrPressedDuration() / (PWR_PRESS_SHUTDOWN / 4);
lcd_clear();
lcd_bmp(76, 0, bmp_shutdown, index*60, 60);
lcdRefresh(); lcdRefresh();
return e_power_press; return e_power_press;
} }