7
7
http://creativecommons.org/licenses/by-sa/3.0/
8
8
Feel free to use, distribute, and sell varients of OpenLog. All we ask is that you include attribution of 'Based on OpenLog by SparkFun'.
9
9
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
11
12
12
13
OpenLog is a simple serial logger based on the ATmega328 running at 16MHz. The whole purpose of this
13
14
logger was to create a logger that just powered up and worked. OpenLog ships with an Arduino/Optiboot
65
66
66
67
#include < SPI.h>
67
68
#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
69
70
#include < EEPROM.h>
70
71
#include < FreeStack.h> // Allows us to print the available stack/RAM size
71
72
@@ -870,7 +871,7 @@ void readConfigFile(void)
870
871
871
872
// Read up to CFG_LENGTH characters from the file. There may be a better way of doing this...
872
873
char c;
873
- int len;
874
+ uint8_t len;
874
875
byte settingsString[CFG_LENGTH];
875
876
for (len = 0 ; len < CFG_LENGTH ; len++) {
876
877
c = configFile.read ();
@@ -1168,7 +1169,7 @@ long readBaud(void)
1168
1169
byte uartSpeedMid = EEPROM.read (LOCATION_BAUD_SETTING_MID);
1169
1170
byte uartSpeedLow = EEPROM.read (LOCATION_BAUD_SETTING_LOW);
1170
1171
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
1172
1173
1173
1174
return (uartSpeed);
1174
1175
}
@@ -1186,15 +1187,15 @@ void commandShell(void)
1186
1187
char buffer[30 ];
1187
1188
byte tempVar;
1188
1189
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.
1190
1191
1191
1192
#if DEBUG
1192
1193
NewSerial.print (F (" FreeStack: " ));
1193
1194
NewSerial.println (FreeStack ());
1194
1195
#endif
1195
1196
1196
1197
#ifdef INCLUDE_SIMPLE_EMBEDDED
1197
- uint32_t file_index;
1198
+ // uint32_t file_index;
1198
1199
byte commandSucceeded = 1 ;
1199
1200
#endif // INCLUDE_SIMPLE_EMBEDDED
1200
1201
@@ -1488,7 +1489,7 @@ void commandShell(void)
1488
1489
// Print file contents from current seek position to the end (readAmount)
1489
1490
byte c;
1490
1491
int16_t v;
1491
- int16_t readSpot = 0 ;
1492
+ uint16_t readSpot = 0 ;
1492
1493
while ((v = tempFile.read ()) >= 0 ) {
1493
1494
// file.read() returns a 16 bit character. We want to be able to print extended ASCII
1494
1495
// So we need 8 bit unsigned.
0 commit comments