/* Reset log tick counter to prepare for next logging interval */\r
CurrentLoggingTicks = 0;\r
\r
+ /* Only log when not connected to a USB host */\r
if (USB_DeviceState == DEVICE_STATE_Unattached)\r
{\r
uint8_t Day, Month, Year;\r
/* Fetch logging interval from EEPROM */\r
LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);\r
\r
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
SetupHardware();\r
\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
/* Mount and open the log file on the dataflash FAT partition */\r
OpenLogFile();\r
\r
/* Discard the first sample from the temperature sensor, as it is generally incorrect */\r
- uint8_t Dummy = Temperature_GetTemperature();\r
+ volatile uint8_t Dummy = Temperature_GetTemperature();\r
(void)Dummy;\r
\r
for (;;)\r