mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-11 01:39:13 +01:00
more automatic tests for MQTT topics; add potentiometer mechanism to simulator; allow simulator to set ADC values on Windows; fix adc strange variable types on BK7231; fix cleaning pin roles between simulator scenes; add windows-only debug macro $channelstates
This commit is contained in:
@@ -36,12 +36,8 @@ void CControllerBulb::onDrawn() {
|
||||
return;
|
||||
}
|
||||
float frac_bulb;
|
||||
if (a->isDutyPercent(100.0f)) {
|
||||
frac_bulb = a->determineLEDLightFraction(b);
|
||||
}
|
||||
else {
|
||||
frac_bulb = b->determineLEDLightFraction(a);
|
||||
}
|
||||
// TODO: better calc, this is straight up wrong in most cases
|
||||
frac_bulb = a->getDutyRange01() * b->getDutyRange01();
|
||||
setShapesFillColor(frac_bulb * col_yellow);
|
||||
if (a->shouldLightUpBulb(b)) {
|
||||
setShapesActive(true);
|
||||
|
||||
Reference in New Issue
Block a user