summaryrefslogtreecommitdiff
path: root/Tonokip_Firmware
diff options
context:
space:
mode:
authortonokip <tonokip@gmail.com>2010-05-05 21:45:37 -0700
committertonokip <tonokip@gmail.com>2010-05-05 21:45:37 -0700
commitc00f11f9859447da59089f0aa0381f1357b47a3e (patch)
treec8c13a6bbaf9319b19a642a2c0de47e4693cf5db /Tonokip_Firmware
parent3841153d9a8f003f54b1d1653c02a4c181f24db0 (diff)
properly check for new serial data
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde2
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) )
{