Skip to content

Commit

Permalink
Fix bad renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Sep 21, 2024
1 parent 8a15dac commit 3555878
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/MycilaRouter/MycilaRouterOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Mycila::RouterOutput::State Mycila::RouterOutput::getState() const {
#ifdef MYCILA_JSON_SUPPORT
void Mycila::RouterOutput::toJson(const JsonObject& root, float gridVoltage) const {
root["bypass"] = isBypassOn() ? "on" : "off";
root["enabled"] = isEnabled();
root["enabled"] = isDimmerEnabled();
root["state"] = getStateName();
root["temperature"] = _temperature.orElse(0);

Expand Down
2 changes: 1 addition & 1 deletion lib/MycilaRouter/MycilaRouterOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace Mycila {

// dimmer

bool isEnabled() const { return _dimmer->isEnabled(); }
bool isDimmerEnabled() const { return _dimmer->isEnabled(); }
bool isAutoDimmerEnabled() const { return _dimmer->isEnabled() && config.autoDimmer && config.calibratedResistance > 0; }
bool isDimmerTemperatureLimitReached() const { return config.dimmerTempLimit > 0 && _temperature.orElse(0) >= config.dimmerTempLimit; }
bool isDimmerOn() const { return _dimmer->isOn(); }
Expand Down
2 changes: 1 addition & 1 deletion src/Website.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ void YaSolR::WebsiteClass::_outputBypassSwitch(Card& card, Mycila::RouterOutput&

void YaSolR::WebsiteClass::_outputDimmerSlider(Card& card, Mycila::RouterOutput& output) {
card.attachCallbackF([&card, &output, this](float value) {
if (output.isEnabled()) {
if (output.isDimmerEnabled()) {
output.setDimmerDutyCycle(value / 100);
}
card.update(output.getDimmerDutyCycle() * 100);
Expand Down

0 comments on commit 3555878

Please sign in to comment.