Skip to content

Commit

Permalink
Fixes issue 205
Browse files Browse the repository at this point in the history
  • Loading branch information
nseidle committed Oct 11, 2016
1 parent 91de4a5 commit e4bdee0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions firmware/OpenLog_Firmware/OpenLog/OpenLog.ino
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SerialPort<0, 512, 0> NewSerial;
//This is the array within the append file routine
//We have to keep SerialPort buffer sizes reasonable so that when we drop to
//the command shell we have RAM available for the various commands like append
#define LOCAL_BUFF_SIZE 256
#define LOCAL_BUFF_SIZE 255 //Must not be larger than charsToRecord variable size which is currently a byte
//512/256 shell works, 5/5 logs passed
//800/128 shell works, 3/5 logs passed
//672/256 shell works, 2/5 logs passed
Expand Down Expand Up @@ -751,8 +751,8 @@ void readConfigFile(void)
int len;
byte settingsString[CFG_LENGTH]; //"115200,103,14,0,1,1,0\r" = 115200 bps, escape char of ASCII(103), 14 times, new log mode, verbose on, echo on, ignore RX false.
for (len = 0 ; len < CFG_LENGTH ; len++) {
if ( (c = configFile.read()) < 0) break; //We've reached the end of the file
if (c == '\r') break; //Bail if we hit the end of this string
c = configFile.read();
if (!(c == ',' || (c >= '0' && c <= '9'))) break; //Bail if we hit a non-numeric or non-comma character
settingsString[len] = c;
}

Expand Down Expand Up @@ -785,7 +785,7 @@ void readConfigFile(void)
for (i = 0 ; i < len; i++)
{
//Pick out one setting from the line of text
for (j = 0 ; settingsString[i] != ',' && i < len && j < 6 ; )
for (j = 0 ; settingsString[i] != ',' && i < len && j < 7 ; )
{
newSettingString[j] = settingsString[i];
i++;
Expand Down

0 comments on commit e4bdee0

Please sign in to comment.