Skip to content

Commit

Permalink
Update watchdog pin configuration and adjust post-transition max coun…
Browse files Browse the repository at this point in the history
…t for load management
  • Loading branch information
FredM67 committed Jan 31, 2025
1 parent 838fae3 commit 66719b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Mk2_3phase_RFdatalog_temp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ inline constexpr RotationModes PRIORITY_ROTATION{ RotationModes::OFF }; /**< set
inline constexpr bool OVERRIDE_PIN_PRESENT{ false }; /**< set it to 'true' if there's a override pin */
#endif

inline constexpr bool WATCHDOG_PIN_PRESENT{ false }; /**< set it to 'true' if there's a watch led */
inline constexpr bool WATCHDOG_PIN_PRESENT{ true }; /**< set it to 'true' if there's a watch led */
inline constexpr bool RELAY_DIVERSION{ false }; /**< set it to 'true' if a relay is used for diversion */
inline constexpr bool DUAL_TARIFF{ false }; /**< set it to 'true' if there's a dual tariff each day AND the router is connected to the billing meter */

Expand Down Expand Up @@ -79,7 +79,7 @@ inline constexpr uint8_t dualTariffPin{ 0xff }; /**< for 3-phase PCB, off-peak t
inline constexpr uint8_t diversionPin{ 0xff }; /**< if LOW, set diversion on standby */
inline constexpr uint8_t rotationPin{ 0xff }; /**< if LOW, trigger a load priority rotation */
inline constexpr uint8_t forcePin{ 0xff }; /**< for 3-phase PCB, force pin */
inline constexpr uint8_t watchDogPin{ 0xff }; /**< watch dog LED */
inline constexpr uint8_t watchDogPin{ 4 }; /**< watch dog LED */

inline constexpr RelayEngine relays{ { { 0xff, 1000, 200, 1, 1 } } }; /**< config for relay diversion, see class definition for defaults and advanced options */

Expand All @@ -90,9 +90,6 @@ inline constexpr int16_t iTemperatureThreshold{ 100 }; /**< the temperature thre

inline constexpr TemperatureSensing temperatureSensing{ 0xff,
{ { 0x28, 0xBE, 0x41, 0x6B, 0x09, 0x00, 0x00, 0xA4 },
{ 0x28, 0xED, 0x5B, 0x6A, 0x09, 0x00, 0x00, 0x9D },
{ 0x28, 0xDB, 0x6D, 0x6A, 0x09, 0x00, 0x00, 0xDA },
{ 0x28, 0x59, 0x1F, 0x6A, 0x09, 0x00, 0x00, 0xB0 },
{ 0x28, 0x1B, 0xD7, 0x6A, 0x09, 0x00, 0x00, 0xB7 } } }; /**< list of temperature sensor Addresses */

inline constexpr uint32_t ROTATION_AFTER_CYCLES{ 8UL * 3600UL * SUPPLY_FREQUENCY }; /**< rotates load priorities after this period of inactivity */
Expand Down
2 changes: 1 addition & 1 deletion Mk2_3phase_RFdatalog_temp/processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ float f_upperEnergyThreshold; /**< dynamic upper threshold */
// for improved control of multiple loads
bool b_recentTransition{ false }; /**< a load state has been recently toggled */
uint8_t postTransitionCount; /**< counts the number of cycle since last transition */
constexpr uint8_t POST_TRANSITION_MAX_COUNT{ 3 }; /**< allows each transition to take effect */
constexpr uint8_t POST_TRANSITION_MAX_COUNT{ 2 }; /**< allows each transition to take effect */
// constexpr uint8_t POST_TRANSITION_MAX_COUNT{50}; /**< for testing only */
uint8_t activeLoad{ NO_OF_DUMPLOADS }; /**< current active load */

Expand Down

0 comments on commit 66719b1

Please sign in to comment.