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() {