1
0
mirror of https://github.com/thelsing/knx.git synced 2025-01-07 00:05:47 +01:00

corrected float with DPT9 ()

* corrected float with DPT9

* Switch Programming-LED also via Bus/ETS

* Again: Prog-LED switchable from bus/ETS
This commit is contained in:
mumpf 2019-08-17 21:14:46 +02:00 committed by thelsing
parent 626d1b73d1
commit 74fe42acaf
2 changed files with 25 additions and 18 deletions

View File

@ -532,6 +532,8 @@ struct tm KNXValue::timeValue() const
KNXValue::KNXValue(float value)
{
_value.doubleValue = value;
_type = DoubleType;
}
KNXValue& KNXValue::operator=(const float value)

View File

@ -17,6 +17,8 @@ Bau57B0 bau(platform);
#endif
bool _toogleProgMode = false;
bool _progLedState = false;
#ifndef __linux__
KnxFacade knx(bau);
ICACHE_RAM_ATTR void buttonUp()
@ -48,17 +50,6 @@ bool KnxFacade::progMode()
void KnxFacade::progMode(bool value)
{
if (value)
{
println("progmode on");
digitalWrite(knx.ledPin(), _ledPinActiveOn);
}
else
{
println("progmode off");
digitalWrite(knx.ledPin(), HIGH - _ledPinActiveOn);
}
_bau.deviceObject().progMode(value);
}
@ -109,6 +100,20 @@ void KnxFacade::writeMemory()
void KnxFacade::loop()
{
if (progMode() != _progLedState)
{
_progLedState = progMode();
if (_progLedState)
{
println("progmode on");
digitalWrite(knx.ledPin(), _ledPinActiveOn);
}
else
{
println("progmode off");
digitalWrite(knx.ledPin(), HIGH - _ledPinActiveOn);
}
}
if (_toogleProgMode)
{
progMode(!progMode());