Commit 1d8355dd by Hideaki Tai

fix for new buffering whill communication

parent f1dff934
...@@ -286,20 +286,16 @@ void sendStatus() ...@@ -286,20 +286,16 @@ void sendStatus()
} }
} }
void waitReply(WhillOmni::LR lr, uint16_t wait_ms = 0) void waitReply(uint16_t wait_ms = 0)
{ {
delay(wait_ms); delay(wait_ms);
whill.parse(); whill.parse();
while(whill.available(lr))
{ printSpeedProfile(WhillOmni::LR::L);
#ifdef DEBUG_INFO printSpeedProfile(WhillOmni::LR::R);
if (whill.dataset(lr) == 0) printSpeedProfile(lr); printSensorInfo(WhillOmni::LR::L);
else if (whill.dataset(lr) == 1) printSensorInfo(lr); printSensorInfo(WhillOmni::LR::R);
else Serial.println("invalid dataset number");
#endif
whill.pop(lr);
}
} }
......
  • Markdown is supported
    0% or
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or sign in to comment