From 2929425a2b6b6c4dd816dc2b4316664bf6269c38 Mon Sep 17 00:00:00 2001 From: Richard Lin Date: Tue, 2 Oct 2018 01:08:00 -0700 Subject: [PATCH] Copy over HJL-01 parameters from another device --- code/espurna/config/hardware.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index b522f328..2603fce9 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1956,10 +1956,11 @@ #define HLW8012_CF1_PIN 14 #define HLW8012_CF_PIN 5 - #define HLW8012_CURRENT_R 0.001 // Current resistor - #define HLW8012_VOLTAGE_R_UP ( 2 * 1200000 ) // Upstream voltage resistor - #define HLW8012_SEL_CURRENT LOW - #define HLW8012_INTERRUPT_ON FALLING + #define HLW8012_SEL_CURRENT LOW + #define HLW8012_CURRENT_RATIO 25740 + #define HLW8012_VOLTAGE_RATIO 313400 + #define HLW8012_POWER_RATIO 3414290 + #define HLW8012_INTERRUPT_ON FALLING // ----------------------------------------------------------------------------- // TONBUX XS-SSA06