Skip to content

Commit

Permalink
Always publish first on_change event
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Oct 15, 2024
1 parent db82188 commit dfe9612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/analogIO/Wippersnapper_AnalogIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void Wippersnapper_AnalogIO::update() {
_analog_input_pins[i].prvPinVal -
(_analog_input_pins[i].prvPinVal * CURRENT_HYSTERISIS);

if (pinValRaw > _pinValThreshHi || pinValRaw < _pinValThreshLow) {
if (_analog_input_pins[i].prvPeriod == 0 || pinValRaw > _pinValThreshHi || pinValRaw < _pinValThreshLow) {
// Perform voltage conversion if we need to
if (_analog_input_pins[i].readMode ==
wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode_ANALOG_READ_MODE_PIN_VOLTAGE) {
Expand Down

0 comments on commit dfe9612

Please sign in to comment.