diff --git a/serial_protocol.c b/serial_protocol.c index b4db13a..78b7493 100644 --- a/serial_protocol.c +++ b/serial_protocol.c @@ -35,6 +35,8 @@ static uint8_t char_counter; void status_message(int status_code) { if (status_code) { switch(status_code) { + case GCSTATUS_OK: + printPgmString(PSTR("ok\r\n")); break; case GCSTATUS_BAD_NUMBER_FORMAT: printPgmString(PSTR("error: Bad number format\n\r")); break; case GCSTATUS_EXPECTED_COMMAND_LETTER: @@ -44,7 +46,9 @@ void status_message(int status_code) { case GCSTATUS_FLOATING_POINT_ERROR: printPgmString(PSTR("error: Floating point error\n\r")); break; default: - printPgmString(PSTR("ok\r\n")); + printPgmString(PSTR("error: ")); + printInteger(status_code); + printPgmString(PSTR("\n\r")); } } }