aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-08-16 04:07:39 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-08-16 04:07:39 +0000
commitef4cff29c3cea77d545869ad71bdd043e5475482 (patch)
tree043ac7fe6707a5dbce5229d3ff36296c92e81d5b
parentc505ba047f8e32bed210b46c65cf465d01a35b77 (diff)
downloadlufa-ef4cff29c3cea77d545869ad71bdd043e5475482.tar.gz
lufa-ef4cff29c3cea77d545869ad71bdd043e5475482.tar.bz2
lufa-ef4cff29c3cea77d545869ad71bdd043e5475482.zip
Fix TempDataLogger project logging interval always being 500ms more than the requested interval.
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c2
-rw-r--r--Projects/TempDataLogger/TempDataLogger.h5
2 files changed, 2 insertions, 5 deletions
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c
index e0a089334..23f78aa37 100644
--- a/Projects/TempDataLogger/TempDataLogger.c
+++ b/Projects/TempDataLogger/TempDataLogger.c
@@ -102,7 +102,7 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK)
uint8_t LEDMask = LEDs_GetLEDs();
/* Check to see if the logging interval has expired */
- if (CurrentLoggingTicks++ < LoggingInterval500MS_SRAM)
+ if (++CurrentLoggingTicks < LoggingInterval500MS_SRAM)
return;
/* Reset log tick counter to prepare for next logging interval */
diff --git a/Projects/TempDataLogger/TempDataLogger.h b/Projects/TempDataLogger/TempDataLogger.h
index f3caa66b3..10597da45 100644
--- a/Projects/TempDataLogger/TempDataLogger.h
+++ b/Projects/TempDataLogger/TempDataLogger.h
@@ -72,11 +72,8 @@
/** LED mask for the library LED driver, to indicate that the USB interface is busy. */
#define LEDMASK_USB_BUSY LEDS_LED2
- /** Filename for the log data when written to the dataflash FAT filesystem. */
- #define LOG_FILENAME "TEMPLOG.txt"
-
/** Default log interval when the EEPROM is blank, in 500ms ticks. */
- #define DEFAULT_LOG_INTERVAL 20
+ #define DEFAULT_LOG_INTERVAL 10
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false