aboutsummaryrefslogtreecommitdiff
path: root/Source/PltParser.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-12-26 22:18:37 +0100
committerXaviDCR92 <xavi.dcr@gmail.com>2017-12-26 22:18:37 +0100
commit4eaa6c091f97ca3455b2ae48a5f68867c0f7768e (patch)
tree79ae89ae5b7399c774ae6fcb792c109a725e1af8 /Source/PltParser.c
parentf06d582d63b1f91e48ecb17a11987217144c5c79 (diff)
* 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.
Diffstat (limited to 'Source/PltParser.c')
-rw-r--r--Source/PltParser.c12
1 files changed, 12 insertions, 0 deletions
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;
}