From fddfbaa4cf7d1f7244cc61cbeac87673f8a4fab5 Mon Sep 17 00:00:00 2001 From: vintagepc <53943260+vintagepc@users.noreply.github.com> Date: Sat, 10 Sep 2022 11:17:06 -0400 Subject: [PATCH] Fix IR digital not updating if the ADC isn't read (#367) --- parts/components/IRSensor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parts/components/IRSensor.cpp b/parts/components/IRSensor.cpp index e43c9e42..f448b334 100644 --- a/parts/components/IRSensor.cpp +++ b/parts/components/IRSensor.cpp @@ -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(GetCurrentValue()); + } }