Refactoring: Scalability and performance (#252)

Refactoring v5.7 step 1
This commit is contained in:
Cabooman 2024-04-14 14:41:01 +02:00 committed by GitHub
parent 5a5cfc433b
commit ffa7a54f20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 926 additions and 286 deletions

View file

@ -0,0 +1,43 @@
#ifndef SYSTEM_SETTINGS_H_
#define SYSTEM_SETTINGS_H_
/** TASKS
*
* Parameter: TASK_CORE_PRIO
* Description:
* Defines the priority of core functionality (CAN, Modbus, etc)
*
* Parameter: TASK_CONNECTIVITY_PRIO
* Description:
* Defines the priority of various wireless functionality (TCP, MQTT, etc)
*/
#define TASK_CORE_PRIO 4
#define TASK_WIFI_PRIO 3
#define TASK_MODBUS_PRIO 8
/** MAX AMOUNT OF CELLS
*
* Parameter: MAX_AMOUNT_CELLS
* Description:
* Basically the length of the array used to hold individual cell voltages
*/
#define MAX_AMOUNT_CELLS 192
/** LED
*
* Parameter: LED_MODE_DEFAULT
* Description:
* The default LED mode. Available modes:
* CLASSIC - slow up/down ramp
* FLOW - slow ramp up or down depending on flow of energy
* HEARTBEAT - Heartbeat-like LED pattern that reacts to the system state with color and BPM
*
* Parameter: LED_PERIOD_MS
* Description:
* The period of whatever LED mode is active. If CLASSIC, then a ramp up and ramp down will finish in
* LED_PERIOD_MS milliseconds
*/
#define LED_MODE_DEFAULT FLOW
#define LED_PERIOD_MS 3000
#define LED_EXECUTION_FREQUENCY 50
#endif