From 96e4d215f66ede165c8be0919bbed8c195c9395e Mon Sep 17 00:00:00 2001 From: Thiemann96 Date: Sat, 28 Mar 2020 15:35:31 +0100 Subject: [PATCH] Hotfix for when automatic is selected and Wifi selection slide is hidden --- src/pages/ota-wizard/ota-wizard.html | 2 +- src/pages/ota-wizard/ota-wizard.ts | 9 ++++++--- src/providers/ota-wifi/ota-wifi.ts | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pages/ota-wizard/ota-wizard.html b/src/pages/ota-wizard/ota-wizard.html index e7830d4..68a46f6 100644 --- a/src/pages/ota-wizard/ota-wizard.html +++ b/src/pages/ota-wizard/ota-wizard.html @@ -136,7 +136,7 @@ - +
diff --git a/src/pages/ota-wizard/ota-wizard.ts b/src/pages/ota-wizard/ota-wizard.ts index 339750e..d37665f 100644 --- a/src/pages/ota-wizard/ota-wizard.ts +++ b/src/pages/ota-wizard/ota-wizard.ts @@ -135,14 +135,13 @@ export class OtaWizardPage implements OnInit, OnDestroy { } } showAutomatic() { - this.wifiSlideHidden = true; + this.hideSlide(OtaSlides.WifiSelection); this.automatic = true; this.manual = false; this.slides.slideNext() } showManual() { - this.wifiSlideHidden = false; this.manual = true; this.automatic = false; this.slides.slideNext() @@ -186,8 +185,12 @@ export class OtaWizardPage implements OnInit, OnDestroy { } get currentSlide(): OtaSlides { - const current = this.slides.getActiveIndex() + let current = this.slides.getActiveIndex() const hiddenOffset = this.hiddenSlides.filter(slide => slide <= current).length + if(current === 3 && this.slideIsHidden(this.slideWifi)){ + // Hotfix for when automatic is selected and Wifi selection slide is hidden + current +=1; + } return current + hiddenOffset } diff --git a/src/providers/ota-wifi/ota-wifi.ts b/src/providers/ota-wifi/ota-wifi.ts index 47c4058..882ab43 100644 --- a/src/providers/ota-wifi/ota-wifi.ts +++ b/src/providers/ota-wifi/ota-wifi.ts @@ -9,7 +9,7 @@ declare var WifiWizard2: any // corresponding to the initial MCU firmware const SSID_PREFIX = 'sensebox' const SENSEBOX_API = 'http://192.168.1.1' -const URL_sensebox = 'http://10.0.1.12' +const URL_sensebox = 'http://192.168.0.46' /* Interface for uploading a binary to a senseBox MCU. */