mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 02:39:57 +02:00
Minor events update on the fly
Updated some comments and the location of the magic EEPROM event log number
This commit is contained in:
parent
ff37650f13
commit
8a12a55bb7
2 changed files with 10 additions and 4 deletions
|
@ -8,7 +8,6 @@
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
#define EE_MAGIC_HEADER_VALUE 0xA5A5
|
|
||||||
#define EE_NOF_EVENT_ENTRIES 30
|
#define EE_NOF_EVENT_ENTRIES 30
|
||||||
#define EE_EVENT_ENTRY_SIZE sizeof(EVENT_LOG_ENTRY_TYPE)
|
#define EE_EVENT_ENTRY_SIZE sizeof(EVENT_LOG_ENTRY_TYPE)
|
||||||
#define EE_WRITE_PERIOD_MINUTES 10
|
#define EE_WRITE_PERIOD_MINUTES 10
|
||||||
|
|
|
@ -8,16 +8,23 @@
|
||||||
|
|
||||||
// #define INCLUDE_EVENTS_TEST // Enable to run an event test loop, see events_test_on_target.cpp
|
// #define INCLUDE_EVENTS_TEST // Enable to run an event test loop, see events_test_on_target.cpp
|
||||||
|
|
||||||
|
#define EE_MAGIC_HEADER_VALUE 0x0001 // 0x0000 to 0xFFFF
|
||||||
|
|
||||||
#define GENERATE_ENUM(ENUM) ENUM,
|
#define GENERATE_ENUM(ENUM) ENUM,
|
||||||
#define GENERATE_STRING(STRING) #STRING,
|
#define GENERATE_STRING(STRING) #STRING,
|
||||||
|
|
||||||
/** EVENT ENUMERATION
|
/** EVENT ENUMERATION
|
||||||
*
|
*
|
||||||
* Do not change the order!
|
* Try not to change the order!
|
||||||
* When adding events, add them RIGHT BEFORE the EVENT_NOF_EVENTS enum.
|
* When adding events, add them RIGHT BEFORE the EVENT_NOF_EVENTS enum.
|
||||||
* In addition, the event name must start with "EVENT_"
|
* In addition, the event name must start with "EVENT_".
|
||||||
|
* If you don't follow this instruction, the EEPROM log will become corrupt.
|
||||||
|
* To handle this, follow the instruction for EE_MAGIC_HEADER_VALUE as
|
||||||
|
* described below.
|
||||||
*
|
*
|
||||||
* After adding an event, assign the proper event level in events.cpp:init_events()
|
* After adding an event:
|
||||||
|
* - Assign the proper event level in events.cpp:init_events()
|
||||||
|
* - Increment EE_MAGIC_HEADER_VALUE in case you've changed the order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EVENTS_ENUM_TYPE(XX) \
|
#define EVENTS_ENUM_TYPE(XX) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue