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:
Robert Strouse 2023-04-05 14:38:11 -07:00
parent 3b8c2e0aea
commit b6bc57e437
8 changed files with 119 additions and 20 deletions

View file

@ -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];