1
0
Fork 0
mirror of https://github.com/sensebox/blockly-app synced 2025-04-19 16:07:33 +02:00

always include SenseBoxOTA.h in the sketch

This commit is contained in:
Norwin 2019-01-15 12:29:19 +01:00
parent d9a4c2d8f4
commit 28b30b37e3

View file

@ -47,6 +47,11 @@ export class OtaWizardPage implements OnInit, OnDestroy {
private compilerprovider:CompilerProvider private compilerprovider:CompilerProvider
) { ) {
this.sketch = navParams.get('sketch') this.sketch = navParams.get('sketch')
// for OTA to work, the new sketch has to include the OTA logic as well.
// to ensure that, we're prepending it here to the sketch.
// this also works regardless wether the sketch already contains this line.
this.sketch = '#include <SenseBoxOTA.h>\n' + this.sketch
} }
ngOnInit() { ngOnInit() {