From 0f92171cea43029aa72b12ae73b0ebccc73eab54 Mon Sep 17 00:00:00 2001 From: Thiemann96 Date: Wed, 12 Feb 2020 12:37:36 +0100 Subject: [PATCH] starts ota wizard on button --- src/pages/blockly/blockly.ts | 1 + src/pages/configuration/configuration.ts | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pages/blockly/blockly.ts b/src/pages/blockly/blockly.ts index 01200ef..52c82de 100644 --- a/src/pages/blockly/blockly.ts +++ b/src/pages/blockly/blockly.ts @@ -59,6 +59,7 @@ export class BlocklyPage implements OnInit { async launchOtaWizard () { const sketch = await this.blockly.getSketch() + console.log(typeof sketch); this.navCtrl.push(OtaWizardPage, { sketch }) } diff --git a/src/pages/configuration/configuration.ts b/src/pages/configuration/configuration.ts index fb6d7da..8c29807 100644 --- a/src/pages/configuration/configuration.ts +++ b/src/pages/configuration/configuration.ts @@ -1,5 +1,6 @@ import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular'; +import { OtaWizardPage } from '../ota-wizard/ota-wizard'; /** * Generated class for the AboutPage page. @@ -23,17 +24,18 @@ export class ConfigurationPage { constructor(public navCtrl: NavController, public navParams: NavParams) { } + async launchOtaWizard () { + + } + uploadStandardSketch(){ - console.log(this.temp); - console.log(this.humi); - console.log(this.lux); - console.log(this.uv); - console.log(this.pm10); - console.log(this.pm25); + /** * Start OTA Wizard here but with the pre defined sketch here and not with the blockly sketch * * */ + const sketch = 'void setup(){Serial.begin(9600);} void loop(){Serial.println("Working");}' + this.navCtrl.push(OtaWizardPage, { sketch }) } ionViewDidLoad() {