77 http://creativecommons.org/licenses/by-sa/3.0/
88 Feel free to use, distribute, and sell varients of OpenLog. All we ask is that you include attribution of 'Based on OpenLog by SparkFun'.
99
10- OpenLog is based on the work of Bill Greiman and sdfatlib: https://github.com/greiman/SdFat-beta
10+ OpenLog is based on the work of Bill Greiman and sdfatlib: https://github.com/greiman/SdFat-beta Currently SDFat v1.1.4.
11+ SerialPort is the work of Bill Greiman and is used to increase the size of the RX buffer: https://github.com/greiman/SerialPort
1112
1213 OpenLog is a simple serial logger based on the ATmega328 running at 16MHz. The whole purpose of this
1314 logger was to create a logger that just powered up and worked. OpenLog ships with an Arduino/Optiboot
6566
6667#include < SPI.h>
6768#include < SdFat.h> // We do not use the built-in SD.h file because it calls Serial.print
68- #include < SerialPort.h> // This is a new/beta library written by Bill Greiman. You rock Bill!
69+ #include < SerialPort.h> // This is a new/beta library written by Bill Greiman. You rock Bill! https://github.com/greiman/SerialPort
6970#include < EEPROM.h>
7071#include < FreeStack.h> // Allows us to print the available stack/RAM size
7172
@@ -870,7 +871,7 @@ void readConfigFile(void)
870871
871872 // Read up to CFG_LENGTH characters from the file. There may be a better way of doing this...
872873 char c;
873- int len;
874+ uint8_t len;
874875 byte settingsString[CFG_LENGTH];
875876 for (len = 0 ; len < CFG_LENGTH ; len++) {
876877 c = configFile.read ();
@@ -1168,7 +1169,7 @@ long readBaud(void)
11681169 byte uartSpeedMid = EEPROM.read (LOCATION_BAUD_SETTING_MID);
11691170 byte uartSpeedLow = EEPROM.read (LOCATION_BAUD_SETTING_LOW);
11701171
1171- long uartSpeed = 0x00FF0000 & ((long )uartSpeedHigh << 16 ) | ((long )uartSpeedMid << 8 ) | uartSpeedLow; // Combine the three bytes
1172+ long uartSpeed = ( 0x00FF0000 & ((long )uartSpeedHigh << 16 ) ) | ((long )uartSpeedMid << 8 ) | uartSpeedLow; // Combine the three bytes
11721173
11731174 return (uartSpeed);
11741175}
@@ -1186,15 +1187,15 @@ void commandShell(void)
11861187 char buffer[30 ];
11871188 byte tempVar;
11881189
1189- char parentDirectory[13 ]; // This tracks the current parent directory. Limited to 13 characters.
1190+ // char parentDirectory[13]; //This tracks the current parent directory. Limited to 13 characters.
11901191
11911192#if DEBUG
11921193 NewSerial.print (F (" FreeStack: " ));
11931194 NewSerial.println (FreeStack ());
11941195#endif
11951196
11961197#ifdef INCLUDE_SIMPLE_EMBEDDED
1197- uint32_t file_index;
1198+ // uint32_t file_index;
11981199 byte commandSucceeded = 1 ;
11991200#endif // INCLUDE_SIMPLE_EMBEDDED
12001201
@@ -1488,7 +1489,7 @@ void commandShell(void)
14881489 // Print file contents from current seek position to the end (readAmount)
14891490 byte c;
14901491 int16_t v;
1491- int16_t readSpot = 0 ;
1492+ uint16_t readSpot = 0 ;
14921493 while ((v = tempFile.read ()) >= 0 ) {
14931494 // file.read() returns a 16 bit character. We want to be able to print extended ASCII
14941495 // So we need 8 bit unsigned.
0 commit comments