41static_assert(!(
DUAL_TARIFF & (
ul_OFF_PEAK_DURATION > 12)),
"******** Off-peak duration cannot last more than 12 hours. Please check your config.h ! ********");
47static_assert(
NO_OF_DUMPLOADS > 0,
"Number of dump loads must be greater than 0");
58static_assert(
ROTATION_AFTER_SECONDS > 0,
"******** ROTATION_AFTER_SECONDS must be greater than 0 ! ********");
59static_assert(
ROTATION_AFTER_SECONDS <= 86400UL,
"******** ROTATION_AFTER_SECONDS cannot exceed 24 hours ! ********");
66 uint16_t used_pins{ 0 };
120 for (uint8_t idx = 0; idx <
relays.get_size(); ++idx)
122 const auto relayPin =
relays.get_relay(idx).get_pin();
139 bool pins_ok{
true };
141 for (uint8_t idx = 0; idx <
relays.get_size(); ++idx)
143 const auto relayPin =
relays.get_relay(idx).get_pin();
161 uint16_t _enum_val{ 0 };
178static_assert(
check_load_priorities(),
"******** Load Priorities wrong ! Please check your config ! ********");
179static_assert(
check_pins(),
"******** Duplicate pin definition ! Please check your config ! ********");
180static_assert((
check_pins() & B00000011) == 0,
"******** Pins 0 & 1 are reserved for RX/TX ! Please check your config ! ********");
181static_assert((
check_pins() & 0xC000) == 0,
"******** Pins 14 and/or 15 do not exist ! Please check your config ! ********");
182static_assert(!(
RF_CHIP_PRESENT && ((
check_pins() & 0x3C04) != 0)),
"******** Pins from RF chip are reserved ! Please check your config ! ********");
183static_assert(
check_relay_pins(),
"******** Wrong pin(s) configuration for relay(s) ********");
186static_assert((
nodeID >= 1 &&
nodeID <= 30),
"******** RF nodeID must be between 1 and 30 ! ********");
187static_assert(
networkGroup >= 1 &&
networkGroup <= 250,
"******** RF networkGroup must be between 1 and 250 ! ********");
Standard three-phase PVRouter setup with 2 dump loads.
constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS]
constexpr bool RELAY_DIVERSION
constexpr int networkGroup
constexpr pairForceLoad rg_ForceLoad[NO_OF_DUMPLOADS]
constexpr bool OVERRIDE_PIN_PRESENT
constexpr uint32_t ROTATION_AFTER_SECONDS
constexpr uint8_t dualTariffPin
constexpr TemperatureSensing temperatureSensing
constexpr uint8_t forcePin
constexpr RelayEngine relays
constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]
constexpr bool DUAL_TARIFF
constexpr uint8_t diversionPin
constexpr bool EMONESP_CONTROL
constexpr uint8_t NO_OF_DUMPLOADS
constexpr uint8_t ul_OFF_PEAK_DURATION
constexpr bool TEMP_SENSOR_PRESENT
constexpr int16_t iTemperatureThreshold
constexpr bool WATCHDOG_PIN_PRESENT
constexpr bool DIVERSION_PIN_PRESENT
constexpr uint8_t rotationPin
constexpr uint8_t watchDogPin
Basic configuration values to be set by the end-user.
constexpr int16_t REQUIRED_EXPORT_IN_WATTS
constexpr uint8_t DATALOG_PERIOD_IN_SECONDS
constexpr uint8_t SUPPLY_FREQUENCY
constexpr int16_t DIVERSION_START_THRESHOLD_WATTS
constexpr int16_t TEMP_RANGE_LOW
constexpr int16_t TEMP_RANGE_HIGH
Some utility functions for pins manipulation.
constexpr void bit_set(T &_dest, const uint8_t bit)
Set the specified bit to 1.
constexpr uint8_t bit_read(const T &_src, const uint8_t bit)
Read the specified bit.
constexpr uint8_t unused_pin
Some utility functions for the RF chip.
constexpr bool RF_CHIP_PRESENT
constexpr uint16_t check_pins()
constexpr uint16_t check_relay_pins()
constexpr bool check_load_priorities()