We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 643feea commit fab9a25Copy full SHA for fab9a25
SinclairScientificExperiments/SinclairEnduranceTimer
@@ -83,10 +83,17 @@ void readEvents()
83
84
void writeEvent()
85
{
86
- eeprom_write_block((void*)&TimeEvent, (void*)eventaddress, sizeof(timeEvent_t));
87
- Serial.print(F("written at: "));
88
- Serial.println(eventaddress);
89
- eventaddress += sizeof(timeEvent_t);
+ if (eventaddress < 1000)
+ {
+ eeprom_write_block((void*)&TimeEvent, (void*)eventaddress, sizeof(timeEvent_t));
+ Serial.print(F("written at: "));
90
+ Serial.println(eventaddress);
91
+ eventaddress += sizeof(timeEvent_t);
92
+ }
93
+ else
94
95
+ Serial.println(F("event log full"));
96
97
}
98
99
@@ -144,4 +151,3 @@ void loop() {
144
151
145
152
146
153
147
-
0 commit comments