properly check for new serial data

This commit is contained in:
tonokip 2010-05-05 21:45:37 -07:00
parent 3841153d9a
commit c00f11f985

View file

@ -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) )
{