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 };
24
25//--------------------------------------------------------------------------------------------------
26// other system constants, should match most of installations
27inline constexpr uint8_t SUPPLY_FREQUENCY{ 50 };
28
29inline constexpr uint32_t WORKING_ZONE_IN_JOULES{ 3600UL };
30
31inline constexpr uint8_t DATALOG_PERIOD_IN_SECONDS{ 5 };
32
34
35// Computes inverse value at compile time to use '*' instead of '/'
36inline constexpr float invSUPPLY_FREQUENCY{ 1.0F / SUPPLY_FREQUENCY };
38//--------------------------------------------------------------------------------------------------
39
40#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
Some useful but missing stl functions templates.