16#include <avr/pgmspace.h>
64 DualTariff::Boost boost;
65 memcpy_P(&boost, &boostTable.boost[
i],
sizeof(boost));
76 const auto minutes{
static_cast< uint16_t
>(ms / 60000UL) };
77 const uint8_t mm{
static_cast< uint8_t
>(minutes % 60) };
95 info(F(
"\tDuration of off-peak period is "));
101 info(F(
"\tTemperature threshold is "));
103 info(F(
" C, on sensor #"));
109 infoln(F(
"\tNo temperature threshold (no temperature sensing)."));
116 info(F(
"\tBoost #"));
120 if (UINT32_MAX == boost.end)
122 info(F(
" until the end"));
129 info(F(
" of off-peak, forcing "));
154 info(F(
"remote load "));
constexpr uint8_t ul_OFF_PEAK_DURATION
constexpr bool TEMP_SENSOR_PRESENT
constexpr int16_t iTemperatureThreshold
constexpr uint8_t BOOST_TEMP_SENSOR
The configuration as the firmware uses it: the settings, and what is built from them.
constexpr BoostSchedule boostSchedule
constexpr uint8_t REMOTE_MASK_BITS
constexpr uint8_t LOCAL_MASK_BITS
void infoln(const Args &... args)
Print an informational message and a line end, as Serial.println() does.
void info(const Args &... args)
Print an informational message, as Serial.print() does.
constexpr BoostTable boostTable PROGMEM
constexpr uint8_t NO_OF_BOOSTS
constexpr BoostTable resolveBoosts()
Resolves each scheduled boost, at compile time.
void printDualTariffConfiguration()
Print the settings for off-peak period.
void printOffPeakTime(const uint32_t ms)
Prints a time in ms from the start of the off-peak period, as <h>h<mm>.
DualTariff::Boost readBoost(const uint8_t i)
Reads scheduled boost i from flash.
The scheduled boosts, resolved for the off-peak duration: window in ms and target masks.
DualTariff::Boost boost[NO_OF_BOOSTS ? NO_OF_BOOSTS :1]
constexpr uint8_t bit_read(const T &_src, const uint8_t bit)
Read the specified bit.