Direct access between GPIO setup and test screens, version info from priming screen
This commit is contained in:
parent
c83a0cc9c5
commit
7817b7f2e0
|
@ -217,9 +217,9 @@ CGPIOScreen::keyHandler(uint8_t event)
|
|||
}
|
||||
}
|
||||
if(event & key_Down) {
|
||||
_scrollChar = 0;
|
||||
_rowSel--;
|
||||
LOWERLIMIT(_rowSel, 0);
|
||||
_scrollChar = 0;
|
||||
_rowSel--;
|
||||
LOWERLIMIT(_rowSel, 0);
|
||||
}
|
||||
// UP press
|
||||
if(event & key_Up) {
|
||||
|
@ -249,7 +249,7 @@ CGPIOScreen::keyHandler(uint8_t event)
|
|||
if(event & key_Centre) {
|
||||
switch(_rowSel) {
|
||||
case 0:
|
||||
_ScreenManager.selectMenu(CScreenManager::RootMenuLoop); // force return to main menu
|
||||
_ScreenManager.selectMenu(CScreenManager::RootMenuLoop, CScreenManager::GPIOInfoUI); // force return to main menu GPIO view
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
@ -346,6 +346,9 @@ CGPIOInfoScreen::keyHandler(uint8_t event)
|
|||
// CENTRE press
|
||||
if(event & key_Centre) {
|
||||
}
|
||||
if(event & key_Down) {
|
||||
_ScreenManager.selectMenu(CScreenManager::UserSettingsLoop, CScreenManager::GPIOUI);
|
||||
}
|
||||
}
|
||||
if(event & keyRepeat) {
|
||||
if(_keyRepeatCount >= 0) {
|
||||
|
|
|
@ -216,14 +216,19 @@ CPrimingScreen::keyHandler(uint8_t event)
|
|||
}
|
||||
// press DOWN
|
||||
if(event & key_Down) {
|
||||
_rowSel--;
|
||||
LOWERLIMIT(_rowSel, 0);
|
||||
_colSel = 0;
|
||||
if(_rowSel == 1)
|
||||
// _colSel = getHeaterInfo().isThermostat() ? 0 : 1;
|
||||
_colSel = getThermostatModeActive() ? 0 : 1;
|
||||
if(_rowSel == 2)
|
||||
_colSel = NVstore.getDegFMode();
|
||||
if(_rowSel == 0) {
|
||||
_ScreenManager.selectMenu(CScreenManager::UserSettingsLoop, CScreenManager::VersionUI); // force return to main menu
|
||||
}
|
||||
else {
|
||||
_rowSel--;
|
||||
LOWERLIMIT(_rowSel, 0);
|
||||
_colSel = 0;
|
||||
if(_rowSel == 1)
|
||||
// _colSel = getHeaterInfo().isThermostat() ? 0 : 1;
|
||||
_colSel = getThermostatModeActive() ? 0 : 1;
|
||||
if(_rowSel == 2)
|
||||
_colSel = NVstore.getDegFMode();
|
||||
}
|
||||
}
|
||||
|
||||
// check if fuel priming was selected
|
||||
|
|
|
@ -222,8 +222,8 @@ CScreenManager::begin(bool bNoClock)
|
|||
|
||||
// create User Settings screens loop
|
||||
menuloop.clear();
|
||||
menuloop.push_back(new CThermostatModeScreen(*_pDisplay, *this)); // experimental settings screen
|
||||
menuloop.push_back(new CGPIOScreen(*_pDisplay, *this)); // GPIO settings screen
|
||||
menuloop.push_back(new CThermostatModeScreen(*_pDisplay, *this)); // experimental settings screen
|
||||
menuloop.push_back(new CVersionInfoScreen(*_pDisplay, *this)); // GPIO settings screen
|
||||
menuloop.push_back(new CHomeMenuSelScreen(*_pDisplay, *this)); // Home menu settings screen
|
||||
menuloop.push_back(new COtherOptionsScreen(*_pDisplay, *this)); // Other options screen
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
enum eUITimerMenus { TimerOverviewUI, Timer1UI, Timer2UI, Timer3UI, Timer4UI, Timer5UI, Timer6UI, Timer7UI,
|
||||
Timer8UI, Timer9UI, Timer10UI, Timer11UI, Timer12UI, Timer13UI, Timer14UI };
|
||||
enum eUITuningMenus { MixtureUI, HeaterSettingsUI };
|
||||
enum eUIUserSettingsMenus { ExThermostatUI, GPIOUI };
|
||||
enum eUIUserSettingsMenus { GPIOUI, ExThermostatUI, VersionUI, HomeMenuUI, TimeIntervalsUI };
|
||||
enum eUIBranchMenus { SetClockUI, InheritSettingsUI, FontDumpUI };
|
||||
public:
|
||||
CScreenManager();
|
||||
|
|
|
@ -262,7 +262,7 @@ CThermostatModeScreen::keyHandler(uint8_t event)
|
|||
if(event & key_Centre) {
|
||||
switch(_rowSel) {
|
||||
case 0:
|
||||
_ScreenManager.selectMenu(CScreenManager::RootMenuLoop); // force return to main menu
|
||||
_ScreenManager.selectMenu(CScreenManager::RootMenuLoop, CScreenManager::SettingsUI); // force return to main menu
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
|
@ -44,9 +44,7 @@ void hard_restart() {
|
|||
|
||||
void initOTA(){
|
||||
FOTA.checkURL = "http://www.mrjones.id.au/afterburner/fota/fota.json";
|
||||
// ArduinoOTA.setHostname("myesp32");
|
||||
ArduinoOTA.setHostname("AfterburnerOTA");
|
||||
// ArduinoOTA.setPassword("TESTO123");
|
||||
|
||||
ArduinoOTA
|
||||
.onStart([]() {
|
||||
|
@ -95,20 +93,22 @@ void DoOTA(){
|
|||
ArduinoOTA.handle();
|
||||
|
||||
// manage Firmware OTA
|
||||
// this is where the controlelr contacts a web server to discover if new firmware is available
|
||||
// this is where the controller contacts a web server to discover if new firmware is available
|
||||
// if so, it can dowload and implant using OTA and become effective next reboot!
|
||||
long tDelta = millis() - FOTAtime;
|
||||
if(tDelta > 0) {
|
||||
FOTAtime = millis() + 600000; // 10 minutes
|
||||
DebugPort.println("Checking for new firmware...");
|
||||
if(FOTA.execHTTPcheck()) {
|
||||
DebugPort.println("New firmware available on web server!");
|
||||
if(FOTAauth == 2) {
|
||||
FOTA.execOTA();
|
||||
FOTAauth = 0;
|
||||
if ((WiFi.status() == WL_CONNECTED)) { // bug workaround in FOTA where execHTTPcheck does not return false in this condition
|
||||
DebugPort.println("Checking for new firmware...");
|
||||
if(FOTA.execHTTPcheck()) {
|
||||
DebugPort.println("New firmware available on web server!");
|
||||
if(FOTAauth == 2) { // user has authorised update (was == 1 before auth.)
|
||||
FOTA.execOTA(); // go ahead and do the update, reading new file from web server
|
||||
FOTAauth = 0; // and we're done.
|
||||
}
|
||||
else
|
||||
FOTAauth = 1; // flag that new firmware is available
|
||||
}
|
||||
else
|
||||
FOTAauth = 1; // flag that new firmware is available
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
esptool.exe --chip esp32 --port COM11 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_qio_80m.bin 0x10000 Afterburner.bin 0x8000 Afterburner.partitions.bin
|
||||
esptool.exe --chip esp32 --port COM14 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_qio_80m.bin 0x10000 Afterburner.bin 0x8000 Afterburner.partitions.bin
|
||||
|
|
Loading…
Reference in a new issue