39static_assert(!(
DUAL_TARIFF & (
ul_OFF_PEAK_DURATION > 12)),
"******** Off-peak duration cannot last more than 12 hours. Please check your config.h ! ********");
45static_assert(
NO_OF_DUMPLOADS > 0,
"Number of dump loads must be greater than 0");
51 uint16_t used_pins{ 0 };
105 for (uint8_t idx = 0; idx <
relays.get_size(); ++idx)
107 const auto relayPin =
relays.get_relay(idx).get_pin();
124 bool pins_ok{
true };
126 for (uint8_t idx = 0; idx <
relays.get_size(); ++idx)
128 const auto relayPin =
relays.get_relay(idx).get_pin();
146 uint16_t _enum_val{ 0 };
163static_assert(
check_load_priorities(),
"******** Load Priorities wrong ! Please check your config ! ********");
164static_assert(
check_pins(),
"******** Duplicate pin definition ! Please check your config ! ********");
165static_assert((
check_pins() & B00000011) == 0,
"******** Pins 0 & 1 are reserved for RX/TX ! Please check your config ! ********");
166static_assert((
check_pins() & 0xC000) == 0,
"******** Pins 14 and/or 15 do not exist ! Please check your config ! ********");
167static_assert(!(
RF_CHIP_PRESENT && ((
check_pins() & 0x3C04) != 0)),
"******** Pins from RF chip are reserved ! Please check your config ! ********");
168static_assert(
check_relay_pins(),
"******** Wrong pin(s) configuration for relay(s) ********");
Configuration values to be set by the end-user.
constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS]
constexpr bool RELAY_DIVERSION
constexpr bool OVERRIDE_PIN_PRESENT
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 uint8_t DATALOG_PERIOD_IN_SECONDS
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()