diff options
author | tonokip <tonokip@gmail.com> | 2010-05-05 21:45:37 -0700 |
---|---|---|
committer | tonokip <tonokip@gmail.com> | 2010-05-05 21:45:37 -0700 |
commit | c00f11f9859447da59089f0aa0381f1357b47a3e (patch) | |
tree | c8c13a6bbaf9319b19a642a2c0de47e4693cf5db /Tonokip_Firmware | |
parent | 3841153d9a8f003f54b1d1653c02a4c181f24db0 (diff) |
properly check for new serial data
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r-- | Tonokip_Firmware/Tonokip_Firmware.pde | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index c31f216..2290a8e 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/Tonokip_Firmware/Tonokip_Firmware.pde @@ -104,7 +104,7 @@ void loop() inline void get_command() { - if( Serial.available() ) { + if( Serial.available() > 0 ) { serial_char = Serial.read(); if(serial_char == '\n' || serial_char == '\r' || serial_char == ':' || serial_count >= (MAX_CMD_SIZE - 1) ) { |