fix: revert default value of slave max modulation; always set max modulation level

Baxi Ampera resets the maximum modulation level to 0 when the heating is turned off
This commit is contained in:
Yurii
2025-05-21 01:17:43 +03:00
parent f212d9d9a8
commit 8b50ed48c1
2 changed files with 11 additions and 13 deletions

View File

@@ -687,19 +687,17 @@ protected:
targetMaxModulation = settings.dhw.maxModulation;
}
if (vars.slave.modulation.max != targetMaxModulation) {
if (this->setMaxModulationLevel(targetMaxModulation)) {
Log.snoticeln(
FPSTR(L_OT), F("Set max modulation: %hhu%% (response: %hhu%%)"),
targetMaxModulation, vars.slave.modulation.max
);
if (this->setMaxModulationLevel(targetMaxModulation)) {
Log.snoticeln(
FPSTR(L_OT), F("Set max modulation: %hhu%% (response: %hhu%%)"),
targetMaxModulation, vars.slave.modulation.max
);
} else {
Log.swarningln(
FPSTR(L_OT), F("Failed set max modulation: %hhu%% (response: %hhu%%)"),
targetMaxModulation, vars.slave.modulation.max
);
}
} else {
Log.swarningln(
FPSTR(L_OT), F("Failed set max modulation: %hhu%% (response: %hhu%%)"),
targetMaxModulation, vars.slave.modulation.max
);
}
// Update modulation level

View File

@@ -328,7 +328,7 @@ struct Variables {
struct {
uint8_t current = 0;
uint8_t min = 0;
uint8_t max = 0;
uint8_t max = 100;
} modulation;
struct {