From c00f11f9859447da59089f0aa0381f1357b47a3e Mon Sep 17 00:00:00 2001 From: tonokip Date: Wed, 5 May 2010 21:45:37 -0700 Subject: properly check for new serial data --- Tonokip_Firmware/Tonokip_Firmware.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Tonokip_Firmware') 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) ) { -- cgit v1.2.1