From 7989cbb44f5c387462fdfa2091f59ea500596998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Metrich?= <45318189+FredM67@users.noreply.github.com> Date: Sun, 30 Apr 2023 11:01:37 +0200 Subject: [PATCH] Final --- Mk2_3phase_RFdatalog_temp/calibration.h | 2 +- Mk2_3phase_RFdatalog_temp/config.h | 9 ++++----- cal_CTx_v_meter/main.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Mk2_3phase_RFdatalog_temp/calibration.h b/Mk2_3phase_RFdatalog_temp/calibration.h index 04a74403..030a4ad7 100644 --- a/Mk2_3phase_RFdatalog_temp/calibration.h +++ b/Mk2_3phase_RFdatalog_temp/calibration.h @@ -31,7 +31,7 @@ // powerCal is the RECIPROCAL of the power conversion rate. A good value // to start with is therefore 1/20 = 0.05 (Watts per ADC-step squared) // -inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.05000F, 0.05000F, 0.05000F }; +inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.04565F, 0.04592F, 0.04505F }; // // f_phaseCal is used to alter the phase of the voltage waveform relative to the current waveform. // The algorithm interpolates between the most recent pair of voltage samples according to the value of f_phaseCal. diff --git a/Mk2_3phase_RFdatalog_temp/config.h b/Mk2_3phase_RFdatalog_temp/config.h index 1f668ebe..8422c479 100644 --- a/Mk2_3phase_RFdatalog_temp/config.h +++ b/Mk2_3phase_RFdatalog_temp/config.h @@ -31,7 +31,7 @@ // constants which must be set individually for each system // inline constexpr uint8_t NO_OF_PHASES{ 3 }; /**< number of phases of the main supply. */ -inline constexpr uint8_t NO_OF_DUMPLOADS{ 3 }; /**< number of dump loads connected to the diverter */ +inline constexpr uint8_t NO_OF_DUMPLOADS{ 2 }; /**< number of dump loads connected to the diverter */ #ifdef EMONESP inline constexpr bool EMONESP_CONTROL{ true }; @@ -66,8 +66,8 @@ inline constexpr bool DUAL_TARIFF{ false }; /**< set it to 'true' if th // D12 is MISO // D13 is SCK -inline constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]{ 5, 6, 7 }; /**< for 3-phase PCB, Load #1/#2/#3 (Rev 2 PCB) */ -inline uint8_t loadPrioritiesAndState[NO_OF_DUMPLOADS]{ 0, 1, 2 }; /**< load priorities and states at startup */ +inline constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]{ 5, 6 }; /**< for 3-phase PCB, Load #1/#2/#3 (Rev 2 PCB) */ +inline uint8_t loadPrioritiesAndState[NO_OF_DUMPLOADS]{ 0, 1 }; /**< load priorities and states at startup */ inline constexpr uint8_t dualTariffPin{ 0xff }; /**< for 3-phase PCB, off-peak trigger */ inline constexpr uint8_t diversionPin{ 0xff }; /**< if LOW, set diversion on standby */ @@ -79,8 +79,7 @@ inline constexpr uint8_t tempSensorPin{ 0xff }; /**< for 3-phase PCB, sensor pin inline constexpr uint8_t ul_OFF_PEAK_DURATION{ 8 }; /**< Duration of the off-peak period in hours */ inline constexpr pairForceLoad rg_ForceLoad[NO_OF_DUMPLOADS]{ { -3, 2 }, /**< force config for load #1 ONLY for dual tariff */ - { -3, 120 }, /**< force config for load #2 ONLY for dual tariff */ - { -180, 2 } }; /**< force config for load #3 ONLY for dual tariff */ + { -180, 2 } }; /**< force config for load #2 ONLY for dual tariff */ inline constexpr int16_t iTemperatureThreshold{ 100 }; /**< the temperature threshold to stop overriding in °C */ diff --git a/cal_CTx_v_meter/main.cpp b/cal_CTx_v_meter/main.cpp index 674c7c61..5b4b021d 100644 --- a/cal_CTx_v_meter/main.cpp +++ b/cal_CTx_v_meter/main.cpp @@ -122,7 +122,7 @@ Polarities polarityConfirmedOfLastSampleV[NO_OF_PHASES]; /**< for zero-crossing // powerCal is the RECIPR0CAL of the power conversion rate. A good value // to start with is therefore 1/20 = 0.05 (Watts per ADC-step squared) // -inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.05000F, 0.05000F, 0.05000F }; +inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.04565F, 0.04592F, 0.04505F }; // f_phaseCal is used to alter the phase of the voltage waveform relative to the // current waveform. The algorithm interpolates between the most recent pair