SamZorSec / Itead_Sonoff

Alternative firmware for Itead Sonoff switches, based on the MQTT protocol and a TLS connection
MIT License
116 stars 33 forks source link

reset/restart error while compiling #4

Closed samabsalom closed 7 years ago

samabsalom commented 7 years ago

Hello Sam,

I'm having a problem compiling the firmware in the arduino ide.

/Users/samabsalom/Downloads/Sonoff-master/sonoff/sonoff.ino: In function 'void reconnect()': sonoff:237: error: 'restart' was not declared in this scope restart(); ^ sonoff:256: error: 'reset' was not declared in this scope reset(); ^ exit status 1 'restart' was not declared in this scope

Do you have any idea what it is i'm doing wrong? I can't work it out!

so far all i have altered to the standard firmware you provided was to comment out the TLS support

Thanks,

Sam

SamZorSec commented 7 years ago

Hi Sam, I didn't have this problem before, it's strange. I cannot verify it now. Maybe, you can try to declare the two functions at the top of the file (before the reconnect() function), with:

void reset();
void restart();

Sam

samabsalom commented 7 years ago

yeah that has allowed me to compile it. do you think the restart and reset functions still work ?

thanks again

Sam

SamZorSec commented 7 years ago

Yes! If my knowledge is C are correct ;).

Sam

samabsalom commented 7 years ago

I wouldn't doubt that for a second! all up and running now. Thanks so much for your help

Sam