From 4eaa6c091f97ca3455b2ae48a5f68867c0f7768e Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Tue, 26 Dec 2017 22:18:37 +0100 Subject: * Slight optimization: all comparations against true are now compared against != false. + Added a provisional background during gameplay (still WIP). * Map editor now allows creating a map. --- Source/PltParser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Source/PltParser.c') diff --git a/Source/PltParser.c b/Source/PltParser.c index ad7cf76..f9fffb0 100644 --- a/Source/PltParser.c +++ b/Source/PltParser.c @@ -89,14 +89,26 @@ bool PltParserLoadFile(char* strPath, TYPE_FLIGHT_DATA* ptrFlightData) if (strlen(buffer) != PLT_FIRST_LINE_CHARACTERS) { + int k; + + dprintf("Buffer: "); + + for (k = 0; k < strlen(buffer); k++) + { + dprintf("0x%02X ", buffer[k]); + } // Format should always be HH:MM (5 characters) // Treat any other combination as possible error + Serial_printf( "Invalid first line length: %d, expected %d characters.\n", + strlen(buffer), + PLT_FIRST_LINE_CHARACTERS ); return false; } if (buffer[PLT_COLON_POSITION] != ':') { // Check whether time format is HH:MM + Serial_printf("Invalid hour/minute format: %s\n", buffer); return false; } -- cgit v1.2.3