From 9b17b00692d5c438c962be8458f04d7132f0dcd3 Mon Sep 17 00:00:00 2001 From: NickGuyver <29263310+NickGuyver@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:22:15 -0700 Subject: [PATCH] fix web, better precision --- src/addons/analog.cpp | 2 +- www/src/Addons/Analog.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addons/analog.cpp b/src/addons/analog.cpp index aae3e26bf..37dfa668a 100644 --- a/src/addons/analog.cpp +++ b/src/addons/analog.cpp @@ -65,7 +65,7 @@ void AnalogInput::process() float magnitude_2 = 0.0f; bool ema_option = analogOptions.analog_smoothing; - float ema_smoothing = analogOptions.smoothing_factor / 100.0f; + float ema_smoothing = analogOptions.smoothing_factor / 1000.0f; struct adc_pair { diff --git a/www/src/Addons/Analog.tsx b/www/src/Addons/Analog.tsx index c2b49a42e..c9f082e2e 100644 --- a/www/src/Addons/Analog.tsx +++ b/www/src/Addons/Analog.tsx @@ -305,7 +305,7 @@ const Analog = ({ values, errors, handleChange, handleCheckbox }) => { hidden={!values.analog_smoothing} type="number" label={t('AddonsConfig:smoothing-factor')} - name="Smoothing_factor" + name="smoothing_factor" className="form-control-sm" groupClassName="col-sm-3 mb-3" value={values.smoothing_factor}