24#ifndef CONFIG_DERIVED_H
25#define CONFIG_DERIVED_H
32#error "This config.h has the former layout, with #include lines and derived values. config.h now only holds the settings: create it again with the configurator, or see 'config.h holds the settings only' in the CHANGELOG to update it by hand."
43static_assert(
NO_OF_PHASES == 3,
"f_powerCal and f_voltageCal below list 3 phases");
The six ADC conversions of the 3-phase board, and the ADMUX pipeline of the free-running ADC.
Calibration values definition.
constexpr float f_ctRating[NO_OF_PHASES]
constexpr float f_powerCalPerAmp[NO_OF_PHASES]
constexpr float f_powerCalOldBoard[NO_OF_PHASES]
constexpr float f_voltageCalOldBoard[NO_OF_PHASES]
constexpr float f_voltageCalNewBoard[NO_OF_PHASES]
The scheduled boosts: a window and the bitmasks of its targets, for each entry.
Manages override pins and their associated bitmasks for forced operation.
Manages a collection of relays and their behavior based on surplus and import thresholds.
Builds and schedules the RF payloads of every remote unit.
The rotation groups, resolved: the priority places each group holds.
What the target codes of config.h stand for, once the load map and the relays are known.
Implements temperature sensing functionality for multiple sensors.
Router configuration: loads, relays, control pins and features.
constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS]
constexpr ScheduledBoosts scheduledBoosts
constexpr bool RELAY_DIVERSION
constexpr TemperatureSensing temperatureSensing
constexpr PcbVersion PCB_VERSION
constexpr RelayEngine relays
constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]
constexpr OverridePins overridePins
constexpr RotationGroups rotationGroups
constexpr uint8_t ADC_PRESCALER
RemoteLoadCore< NO_OF_REMOTE_UNITS > remoteLoads
The one and only remote-load controller.
constexpr uint8_t SAMPLE_SETS_MARGIN
constexpr TargetMap targetMap
What LOAD(), RELAY() and ALL_...() stand for, in overridePins and scheduledBoosts.
constexpr uint8_t SAMPLE_SETS_PER_CYCLE
constexpr uint8_t ADC_CLOCKS_PER_CONVERSION
constexpr uint32_t SAMPLE_SET_PERIOD_US
constexpr Rotation::Table rotationTable
The priority places each rotation group rotates in.
constexpr float f_voltageCal[NO_OF_PHASES]
constexpr uint32_t MAX_SAMPLE_SETS_PER_DATALOG
constexpr bool REMOTE_LOADS_PRESENT
constexpr uint8_t NO_OF_REMOTE_UNITS
constexpr BoostSchedule boostSchedule
constexpr bool NEW_BOARD_CALIBRATION
constexpr RelayDiverter relayDiverter
constexpr float f_powerCal[NO_OF_PHASES]
constexpr TempSensors tempSensors
constexpr uint8_t DATALOG_POWER_SHIFT
constexpr OverrideTable overrideTable
constexpr uint8_t NO_OF_REMOTE_LOADS
Basic configuration values to be set by the end-user.
constexpr conditional< DATALOG_PERIOD_IN_SECONDS *SUPPLY_FREQUENCY >=UINT8_MAX, uint16_t, uint8_t >::type DATALOG_PERIOD_IN_MAINS_CYCLES
constexpr uint8_t NO_OF_PHASES
constexpr uint8_t SUPPLY_FREQUENCY
Integer arithmetic of the datalog: power and RMS voltage per phase.
The text output: informational messages (info) and debug messages (debug)
constexpr uint8_t NO_OF_CONVERSIONS
constexpr uint8_t powerShift(const uint32_t maxSampleSets)
The shift by which the ISR scales the power down before adding it to the datalog sum.
constexpr uint8_t countUnits(const uint8_t(&map)[N])
Highest remote unit number appearing in the map (0 if fully local).
constexpr uint8_t countRemoteLoads(const uint8_t(&map)[N])
Number of entries of the map that are driven remotely.
Support for remotely controlled loads via RF using RFM69.
Unit grouping and payload bookkeeping for remotely controlled loads.
The rotation groups: which loads take turns, checked and resolved at compile time.
Some basics classes/types.
Some utility functions for dual tariff feature.
Compile-time utilities for managing override pins and index-to-bitmask mapping.
Some utility functions for the relay output feature.
Provides utilities for managing temperature sensors.