mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
clean up and add ifdef's for event loop stuff
This commit is contained in:
parent
8e38e8562f
commit
9b47043aba
4 changed files with 21 additions and 13 deletions
|
@ -30,6 +30,7 @@ void init_events(void) {
|
|||
}
|
||||
|
||||
void set_event(EVENTS_ENUM_TYPE event, uint8_t data) {
|
||||
#ifdef EVENTLOGGING
|
||||
if (event >= EVENT_NOF_EVENTS) {
|
||||
event = EVENT_UNKNOWN_EVENT_SET;
|
||||
}
|
||||
|
@ -40,6 +41,7 @@ void set_event(EVENTS_ENUM_TYPE event, uint8_t data) {
|
|||
#ifdef DEBUG_VIA_USB
|
||||
Serial.println("Set event: " + String(get_event_enum_string(event)) + ". Has occured " + String(entries[event].occurences) + " times");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void update_event_timestamps(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue