Skip to content

Commit

Permalink
Fix IR digital not updating if the ADC isn't read (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
vintagepc authored Sep 10, 2022
1 parent edb79ce commit fddfbaa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parts/components/IRSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,9 @@ void IRSensor::Set(IRState val)

void IRSensor::Auto_Input(uint32_t val)
{
m_bExternal = val>0;
if (IsConnected() && m_bExternal != (val>0))
{
m_bExternal = val>0;
_SyncDigitalIRQ<VoltageSrc>(GetCurrentValue());
}
}

0 comments on commit fddfbaa

Please sign in to comment.