3-phase PV router
Loading...
Searching...
No Matches
config_system.h
Go to the documentation of this file.
1
11
12#ifndef CONFIG_SYSTEM_H
13#define CONFIG_SYSTEM_H
14
15#include <Arduino.h>
16
17#include "type_traits.hpp"
18
19inline constexpr uint8_t NO_OF_PHASES{ 3 };
20
21//--------------------------------------------------------------------------------------------------
22// for users with zero-export profile, this value will be negative
23inline constexpr int16_t REQUIRED_EXPORT_IN_WATTS{ 20 };
24inline constexpr int16_t DIVERSION_START_THRESHOLD_WATTS{ 0 };
25
26//--------------------------------------------------------------------------------------------------
27// other system constants, should match most of installations
28inline constexpr uint8_t SUPPLY_FREQUENCY{ 50 };
29
30inline constexpr uint32_t WORKING_ZONE_IN_JOULES{ 3600UL };
31
32inline constexpr uint8_t DATALOG_PERIOD_IN_SECONDS{ 5 };
33
35
36// Computes inverse value at compile time to use '*' instead of '/'
37inline constexpr float invSUPPLY_FREQUENCY{ 1.0F / SUPPLY_FREQUENCY };
39//--------------------------------------------------------------------------------------------------
40
41#endif // CONFIG_SYSTEM_H
constexpr int16_t REQUIRED_EXPORT_IN_WATTS
constexpr uint32_t WORKING_ZONE_IN_JOULES
constexpr float invDATALOG_PERIOD_IN_MAINS_CYCLES
constexpr float invSUPPLY_FREQUENCY
constexpr conditional< DATALOG_PERIOD_IN_SECONDS *SUPPLY_FREQUENCY >=UINT8_MAX, uint16_t, uint8_t >::type DATALOG_PERIOD_IN_MAINS_CYCLES
constexpr uint8_t DATALOG_PERIOD_IN_SECONDS
constexpr uint8_t NO_OF_PHASES
constexpr uint8_t SUPPLY_FREQUENCY
constexpr int16_t DIVERSION_START_THRESHOLD_WATTS
Some useful but missing stl functions templates.