Relay dispatch now waits for reciver to finish reciving packet

This commit is contained in:
2020-01-17 17:25:37 +01:00
parent d91e08db15
commit 206024b2c7
5 changed files with 15 additions and 7 deletions

View File

@ -48,6 +48,11 @@ int8_t W433DataReciver::reciveBit(uint8_t index)
else return -1;
}
void W433DataReciver::waitForReciveIdle(const uint16_t timeoutMs)
{
for(uint16_t i = 0; i < timeoutMs && state != LOOKING_FOR_SYNC; ++i ) _delay_ms(1);
}
bool W433DataReciver::isTime(int16_t input, const uint16_t time, const bool state, const uint16_t tollerance)
{