mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Change pairing so that the command can be repeated on failure. #15. Add extra 0 to indicate there are no more bits to be read from the bitstream.
This commit is contained in:
parent
3b8c2e0aea
commit
b6bc57e437
8 changed files with 119 additions and 20 deletions
8
Utils.h
8
Utils.h
|
|
@ -51,7 +51,13 @@ typedef struct rebootDelay_t {
|
|||
int rebootTime = 0;
|
||||
bool closed = false;
|
||||
};
|
||||
|
||||
static bool toBoolean(const char *str, bool def) {
|
||||
if(!str) return def;
|
||||
if(strlen(str) == 0) return def;
|
||||
else if(str[0] == 't' || str[0] == 'T' || str[0] == '1') return true;
|
||||
else if(str[0] == 'f' || str[0] == 'F' || str[0] == '0') return false;
|
||||
return def;
|
||||
}
|
||||
|
||||
class Timestamp {
|
||||
char _timeBuffer[44];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue