Skip to content

Commit

Permalink
Introduced Dimmer Type dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Jan 6, 2025
1 parent 18b3b62 commit ce1f723
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 104 deletions.
20 changes: 11 additions & 9 deletions data/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,24 @@ <h1>YaSolR Configuration</h1>
zcd_enable: ["Enable Zero-Cross Detection", "switch"],

"Hardware (config)": "TITLE",
grid_freq: ["Nominal Grid Frequency (0 == auto-detect)", "select", "0,50,60"],
disp_angle: ["Display Rotation", "select", "0,90,180,270"],
disp_speed: ["Display Speed (s)", "select", "1,2,3,4,5,6,7,8,9,10"],
disp_type: ["Display Type", "select", "SH1106,SH1107,SSD1306"],
disp_angle: ["Display Rotation", "select", "0,90,180,270"],
relay1_type: ["Relay 1 Type", "select", "NO,NC"],
relay2_type: ["Relay 2 Type", "select", "NO,NC"],
relay1_load: ["Relay 1 Automatic Control: Connected Load (Watts)", "uint"],
relay2_load: ["Relay 2 Automatic Control: Connected Load (Watts)", "uint"],
o1_relay_type: ["Output 1 Bypass Relay Type", "select", "NO,NC"],
o2_relay_type: ["Output 2 Bypass Relay Type", "select", "NO,NC"],
grid_freq: ["Nominal Grid Frequency (0 == auto-detect)", "select", "0,50,60"],
o1_dim_min: ["Output 1 Dimmer Remap Min (%)", "percent"],
o1_dim_max: ["Output 1 Dimmer Remap Max (%)", "percent"],
o1_dim_type: ["Output 1 Dimmer Type", "select", "LSA + DAC GP8211S (DFR1071),LSA + DAC GP8403 (DFR0971),LSA + DAC GP8413 (DFR1073),LSA + PWM->Analog,Robodyn 24A / 40A,SSR Random,SSR Sync (Zero-Cross),Triac / Thyristor"],
o1_relay_type: ["Output 1 Bypass Relay Type", "select", "NO,NC"],
o1_resistance: ["Output 1 Resistance (Ohm)", "uint"],
o2_dim_min: ["Output 2 Dimmer Remap Min (%)", "percent"],
o2_dim_max: ["Output 2 Dimmer Remap Max (%)", "percent"],
o1_resistance: ["Output 1 Resistance (Ohm)", "uint"],
o2_dim_type: ["Output 2 Dimmer Type", "select", "LSA + DAC GP8211S (DFR1071),LSA + DAC GP8403 (DFR0971),LSA + DAC GP8413 (DFR1073),LSA + PWM->Analog,Robodyn 24A / 40A,SSR Random,SSR Sync (Zero-Cross),Triac / Thyristor"],
o2_relay_type: ["Output 2 Bypass Relay Type", "select", "NO,NC"],
o2_resistance: ["Output 2 Resistance (Ohm)", "uint"],
relay1_load: ["Relay 1 Automatic Control: Connected Load (Watts)", "uint"],
relay1_type: ["Relay 1 Type", "select", "NO,NC"],
relay2_load: ["Relay 2 Automatic Control: Connected Load (Watts)", "uint"],
relay2_type: ["Relay 2 Type", "select", "NO,NC"],

"PID Calibration": "TITLE",
pid_pmode: ["Proportional Mode (1: On Error, 2: On Input, 3: Both)", "select", "1,2,3"],
Expand Down
10 changes: 5 additions & 5 deletions include/i18n/en.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
#define YASOLR_LBL_146 YASOLR_LBL_070 " Resistance (Ω)"
#define YASOLR_LBL_147 YASOLR_LBL_046 " PZEM Pairing"
#define YASOLR_LBL_148 YASOLR_LBL_070 " PZEM Pairing"
#define YASOLR_LBL_149 YASOLR_LBL_046 " Relay Type (Bypass)"
#define YASOLR_LBL_150 YASOLR_LBL_070 " Relay Type (Bypass)"
#define YASOLR_LBL_149 YASOLR_LBL_046 " Bypass Relay Type"
#define YASOLR_LBL_150 YASOLR_LBL_070 " Bypass Relay Type"
#define YASOLR_LBL_151 YASOLR_LBL_074 " Type"
#define YASOLR_LBL_152 YASOLR_LBL_077 " Type"
#define YASOLR_LBL_153 "Duplicate"
Expand Down Expand Up @@ -185,7 +185,7 @@
#define YASOLR_LBL_183 YASOLR_LBL_046 " Dimmer Min/Max Remapping"
#define YASOLR_LBL_184 YASOLR_LBL_070 " Dimmer Min/Max Remapping"
#define YASOLR_LBL_185 "Restart required!"
#define YASOLR_LBL_186 "Resistance Value Detection"
#define YASOLR_LBL_186 "Output Resistance Calibration"
#define YASOLR_LBL_187 "JSY Remote"
#define YASOLR_LBL_030 "Relay: " YASOLR_LBL_046 " Bypass Relay Switch Count"
#define YASOLR_LBL_031 "Relay: " YASOLR_LBL_070 " Bypass Relay Switch Count"
Expand All @@ -196,8 +196,8 @@
#define YASOLR_LBL_190 "Gateway"
#define YASOLR_LBL_191 "DNS Server"
#define YASOLR_LBL_192 "Device: Reboot Reason"
// #define YASOLR_LBL_193
// #define YASOLR_LBL_194
#define YASOLR_LBL_193 YASOLR_LBL_046 " Dimmer Type"
#define YASOLR_LBL_194 YASOLR_LBL_070 " Dimmer Type"
// #define YASOLR_LBL_195
// #define YASOLR_LBL_196
// #define YASOLR_LBL_197
Expand Down
8 changes: 4 additions & 4 deletions include/i18n/fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#define YASOLR_LBL_047 "État"
#define YASOLR_LBL_048 "Température"
#define YASOLR_LBL_049 "Supprimer le certificat serveur"
#define YASOLR_LBL_050 "variateur"
#define YASOLR_LBL_050 "Variateur"
#define YASOLR_LBL_051 "Marche forcée"
#define YASOLR_LBL_052 "Puissance"
#define YASOLR_LBL_053 "Puissance Apparente"
Expand All @@ -65,7 +65,7 @@
#define YASOLR_LBL_059 "Énergie"
#define YASOLR_LBL_060 "Routage automatique"
#define YASOLR_LBL_061 "Limite de surplus (W)"
#define YASOLR_LBL_062 "Limitation du dimmer"
#define YASOLR_LBL_062 "Limitation du variateur"
#define YASOLR_LBL_063 "Température de consigne d'arrêt du routage (°C)"
#define YASOLR_LBL_064 "Marche forcée automatique"
#define YASOLR_LBL_065 "Température de démarrage de la marche forcée (°C)"
Expand Down Expand Up @@ -196,8 +196,8 @@
#define YASOLR_LBL_190 "Passerelle"
#define YASOLR_LBL_191 "Serveur DNS"
#define YASOLR_LBL_192 "Micro-contrôleur: Raison du reboot"
// #define YASOLR_LBL_193
// #define YASOLR_LBL_194
#define YASOLR_LBL_193 "Sortie 1: Type de variateur"
#define YASOLR_LBL_194 "Sortie 2: Type de variateur"
// #define YASOLR_LBL_195
// #define YASOLR_LBL_196
// #define YASOLR_LBL_197
Expand Down
14 changes: 12 additions & 2 deletions include/yasolr_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
// default settings

#define YASOLR_ADMIN_USERNAME "admin"
#define YASOLR_DIMMER_LSA_GP8211S "LSA + DAC GP8211S (DFR1071)"
#define YASOLR_DIMMER_LSA_GP8403 "LSA + DAC GP8403 (DFR0971)"
#define YASOLR_DIMMER_LSA_GP8413 "LSA + DAC GP8413 (DFR1073)"
#define YASOLR_DIMMER_LSA_PWM "LSA + PWM->Analog"
#define YASOLR_DIMMER_ROBODYN "Robodyn 24A / 40A"
#define YASOLR_DIMMER_SSR_RANDOM "SSR Random"
#define YASOLR_DIMMER_SSR_SYNC "SSR Sync (Zero-Cross)"
#define YASOLR_DIMMER_TRIAC "Triac / Thyristor"
#define YASOLR_DISPLAY_LINE_SIZE 21
#define YASOLR_DISPLAY_LINES 5
#define YASOLR_GRAPH_POINTS 60
Expand Down Expand Up @@ -132,8 +140,9 @@
#define KEY_OUTPUT1_DIMMER_MAX "o1_dim_max"
#define KEY_OUTPUT1_DIMMER_MIN "o1_dim_min"
#define KEY_OUTPUT1_DIMMER_TEMP_LIMITER "o1_dim_max_t"
#define KEY_OUTPUT1_RELAY_TYPE "o1_relay_type"
#define KEY_OUTPUT1_DIMMER_TYPE "o1_dim_type"
#define KEY_OUTPUT1_EXCESS_LIMITER "o1_excess_limit"
#define KEY_OUTPUT1_RELAY_TYPE "o1_relay_type"
#define KEY_OUTPUT1_RESISTANCE "o1_resistance"
#define KEY_OUTPUT1_TEMPERATURE_MQTT_TOPIC "o1_temp_mqtt"
#define KEY_OUTPUT1_TEMPERATURE_START "o1_temp_start"
Expand All @@ -145,8 +154,9 @@
#define KEY_OUTPUT2_DIMMER_MAX "o2_dim_max"
#define KEY_OUTPUT2_DIMMER_MIN "o2_dim_min"
#define KEY_OUTPUT2_DIMMER_TEMP_LIMITER "o2_dim_max_t"
#define KEY_OUTPUT2_RELAY_TYPE "o2_relay_type"
#define KEY_OUTPUT2_DIMMER_TYPE "o2_dim_type"
#define KEY_OUTPUT2_EXCESS_LIMITER "o2_excess_limit"
#define KEY_OUTPUT2_RELAY_TYPE "o2_relay_type"
#define KEY_OUTPUT2_RESISTANCE "o2_resistance"
#define KEY_OUTPUT2_TEMPERATURE_MQTT_TOPIC "o2_temp_mqtt"
#define KEY_OUTPUT2_TEMPERATURE_START "o2_temp_start"
Expand Down
12 changes: 7 additions & 5 deletions src/yasolr_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ void yasolr_init_config() {
config.configure(KEY_ENABLE_DISPLAY, YASOLR_FALSE);
config.configure(KEY_ENABLE_DS18_SYSTEM, YASOLR_FALSE);
config.configure(KEY_ENABLE_HA_DISCOVERY, YASOLR_FALSE);
config.configure(KEY_ENABLE_JSY, YASOLR_FALSE);
config.configure(KEY_ENABLE_JSY_REMOTE, YASOLR_FALSE);
config.configure(KEY_ENABLE_JSY, YASOLR_FALSE);
config.configure(KEY_ENABLE_LIGHTS, YASOLR_FALSE);
config.configure(KEY_ENABLE_MQTT, YASOLR_FALSE);
config.configure(KEY_ENABLE_OUTPUT1_AUTO_BYPASS, YASOLR_FALSE);
Expand Down Expand Up @@ -60,11 +60,12 @@ void yasolr_init_config() {
config.configure(KEY_NTP_TIMEZONE, "Europe/Paris");
config.configure(KEY_OUTPUT1_DAYS, YASOLR_WEEK_DAYS);
config.configure(KEY_OUTPUT1_DIMMER_LIMIT, "100");
config.configure(KEY_OUTPUT1_DIMMER_TEMP_LIMITER, "0");
config.configure(KEY_OUTPUT1_DIMMER_MAX, "100");
config.configure(KEY_OUTPUT1_DIMMER_MIN, "0");
config.configure(KEY_OUTPUT1_RELAY_TYPE, YASOLR_RELAY_TYPE_NO);
config.configure(KEY_OUTPUT1_DIMMER_TEMP_LIMITER, "0");
config.configure(KEY_OUTPUT1_DIMMER_TYPE, YASOLR_DIMMER_ROBODYN);
config.configure(KEY_OUTPUT1_EXCESS_LIMITER, "0");
config.configure(KEY_OUTPUT1_RELAY_TYPE, YASOLR_RELAY_TYPE_NO);
config.configure(KEY_OUTPUT1_RESISTANCE, "0");
config.configure(KEY_OUTPUT1_TEMPERATURE_MQTT_TOPIC);
config.configure(KEY_OUTPUT1_TEMPERATURE_START, "50");
Expand All @@ -73,11 +74,12 @@ void yasolr_init_config() {
config.configure(KEY_OUTPUT1_TIME_STOP, "06:00");
config.configure(KEY_OUTPUT2_DAYS, YASOLR_WEEK_DAYS);
config.configure(KEY_OUTPUT2_DIMMER_LIMIT, "100");
config.configure(KEY_OUTPUT2_DIMMER_TEMP_LIMITER, "0");
config.configure(KEY_OUTPUT2_DIMMER_MAX, "100");
config.configure(KEY_OUTPUT2_DIMMER_MIN, "0");
config.configure(KEY_OUTPUT2_RELAY_TYPE, YASOLR_RELAY_TYPE_NO);
config.configure(KEY_OUTPUT2_DIMMER_TEMP_LIMITER, "0");
config.configure(KEY_OUTPUT2_DIMMER_TYPE, YASOLR_DIMMER_ROBODYN);
config.configure(KEY_OUTPUT2_EXCESS_LIMITER, "0");
config.configure(KEY_OUTPUT2_RELAY_TYPE, YASOLR_RELAY_TYPE_NO);
config.configure(KEY_OUTPUT2_RESISTANCE, "0");
config.configure(KEY_OUTPUT2_TEMPERATURE_MQTT_TOPIC);
config.configure(KEY_OUTPUT2_TEMPERATURE_START, "50");
Expand Down
85 changes: 48 additions & 37 deletions src/yasolr_dashboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,38 +241,41 @@ dash::FeedbackSwitchCard _jsy(dashboard, YASOLR_LBL_128);
dash::FeedbackSwitchCard _jsyRemote(dashboard, YASOLR_LBL_187);
dash::FeedbackSwitchCard _led(dashboard, YASOLR_LBL_129);
dash::FeedbackSwitchCard _mqtt(dashboard, YASOLR_LBL_095);
dash::FeedbackSwitchCard _output1Relay(dashboard, YASOLR_LBL_134);
dash::FeedbackSwitchCard _output1Dimmer(dashboard, YASOLR_LBL_131);
dash::FeedbackSwitchCard _output1DS18(dashboard, YASOLR_LBL_132);
dash::FeedbackSwitchCard _output1PZEM(dashboard, YASOLR_LBL_133);
dash::FeedbackSwitchCard _output1Relay(dashboard, YASOLR_LBL_134);
dash::FeedbackSwitchCard _output2Relay(dashboard, YASOLR_LBL_138);
dash::FeedbackSwitchCard _output2Dimmer(dashboard, YASOLR_LBL_135);
dash::FeedbackSwitchCard _output2DS18(dashboard, YASOLR_LBL_136);
dash::FeedbackSwitchCard _output2PZEM(dashboard, YASOLR_LBL_137);
dash::FeedbackSwitchCard _output2Relay(dashboard, YASOLR_LBL_138);
dash::FeedbackSwitchCard _relay1(dashboard, YASOLR_LBL_074);
dash::FeedbackSwitchCard _relay2(dashboard, YASOLR_LBL_077);
dash::FeedbackSwitchCard _routerDS18(dashboard, YASOLR_LBL_139);
dash::FeedbackSwitchCard _zcd(dashboard, YASOLR_LBL_125);

dash::Tab _hardwareConfigTab(dashboard, "\u2699 " YASOLR_LBL_140);
dash::DropdownCard<const char*> _gridFreq(dashboard, YASOLR_LBL_141, "Auto-detect,50 Hz,60 Hz");
dash::SliderCard<uint8_t> _displaySpeed(dashboard, YASOLR_LBL_142, 1, 10, 1, "s");
dash::DropdownCard<const char*> _displayType(dashboard, YASOLR_LBL_143, "SH1106,SH1107,SSD1306");
dash::DropdownCard<uint16_t> _displayRotation(dashboard, YASOLR_LBL_144, "0,90,180,270");
dash::DropdownCard<const char*> _relay1Type(dashboard, YASOLR_LBL_151, "NO,NC");
dash::DropdownCard<const char*> _relay2Type(dashboard, YASOLR_LBL_152, "NO,NC");
dash::TextInputCard<uint16_t> _relay1Load(dashboard, YASOLR_LBL_072);
dash::TextInputCard<uint16_t> _relay2Load(dashboard, YASOLR_LBL_075);
dash::DropdownCard<const char*> _gridFreq(dashboard, YASOLR_LBL_141, "Auto-detect,50 Hz,60 Hz");
dash::DropdownCard<const char*> _output1RelayType(dashboard, YASOLR_LBL_149, "NO,NC");
dash::DropdownCard<const char*> _output2RelayType(dashboard, YASOLR_LBL_150, "NO,NC");
dash::RangeSliderCard<uint8_t> _output1DimmerMapper(dashboard, YASOLR_LBL_183, 0, 100, 1, "%");
dash::RangeSliderCard<uint8_t> _output2DimmerMapper(dashboard, YASOLR_LBL_184, 0, 100, 1, "%");
dash::DropdownCard<const char*> _output1DimmerType(dashboard, YASOLR_LBL_193, YASOLR_DIMMER_LSA_GP8211S "," YASOLR_DIMMER_LSA_GP8403 "," YASOLR_DIMMER_LSA_GP8413 "," YASOLR_DIMMER_LSA_PWM "," YASOLR_DIMMER_ROBODYN "," YASOLR_DIMMER_SSR_RANDOM "," YASOLR_DIMMER_SSR_SYNC "," YASOLR_DIMMER_TRIAC);
dash::SwitchCard _output1PZEMSync(dashboard, YASOLR_LBL_147);
dash::SwitchCard _output2PZEMSync(dashboard, YASOLR_LBL_148);
dash::FeedbackTextInputCard<float, 2> _output1ResistanceInput(dashboard, YASOLR_LBL_145);
dash::DropdownCard<const char*> _output2RelayType(dashboard, YASOLR_LBL_150, "NO,NC");
dash::RangeSliderCard<uint8_t> _output2DimmerMapper(dashboard, YASOLR_LBL_184, 0, 100, 1, "%");
dash::DropdownCard<const char*> _output2DimmerType(dashboard, YASOLR_LBL_193, YASOLR_DIMMER_LSA_GP8211S "," YASOLR_DIMMER_LSA_GP8403 "," YASOLR_DIMMER_LSA_GP8413 "," YASOLR_DIMMER_LSA_PWM "," YASOLR_DIMMER_ROBODYN "," YASOLR_DIMMER_SSR_RANDOM "," YASOLR_DIMMER_SSR_SYNC "," YASOLR_DIMMER_TRIAC);
dash::SwitchCard _output2PZEMSync(dashboard, YASOLR_LBL_148);
dash::FeedbackTextInputCard<float, 2> _output2ResistanceInput(dashboard, YASOLR_LBL_146);
dash::SwitchCard _resistanceCalibration(dashboard, YASOLR_LBL_186);

dash::TextInputCard<uint16_t> _relay1Load(dashboard, YASOLR_LBL_072);
dash::DropdownCard<const char*> _relay1Type(dashboard, YASOLR_LBL_151, "NO,NC");
dash::TextInputCard<uint16_t> _relay2Load(dashboard, YASOLR_LBL_075);
dash::DropdownCard<const char*> _relay2Type(dashboard, YASOLR_LBL_152, "NO,NC");

dash::Tab _pidTab(dashboard, "\u2699 " YASOLR_LBL_159);
dash::SwitchCard _pidView(dashboard, YASOLR_LBL_169);
dash::DropdownCard<const char*> _pidPMode(dashboard, YASOLR_LBL_160, YASOLR_PID_P_MODE_1 "," YASOLR_PID_P_MODE_2 "," YASOLR_PID_P_MODE_3);
Expand Down Expand Up @@ -663,22 +666,24 @@ void YaSolR::Website::begin() {

// Hardware (config)

_gridFreq.setTab(_hardwareConfigTab);
_displayRotation.setTab(_hardwareConfigTab);
_displayType.setTab(_hardwareConfigTab);
_displaySpeed.setTab(_hardwareConfigTab);
_displayType.setTab(_hardwareConfigTab);
_gridFreq.setTab(_hardwareConfigTab);
_output1DimmerMapper.setTab(_hardwareConfigTab);
_output1DimmerType.setTab(_hardwareConfigTab);
_output1PZEMSync.setTab(_hardwareConfigTab);
_output2PZEMSync.setTab(_hardwareConfigTab);
_output1RelayType.setTab(_hardwareConfigTab);
_output1ResistanceInput.setTab(_hardwareConfigTab);
_output2DimmerMapper.setTab(_hardwareConfigTab);
_output2DimmerType.setTab(_hardwareConfigTab);
_output2PZEMSync.setTab(_hardwareConfigTab);
_output2RelayType.setTab(_hardwareConfigTab);
_relay1Type.setTab(_hardwareConfigTab);
_relay2Type.setTab(_hardwareConfigTab);
_output2ResistanceInput.setTab(_hardwareConfigTab);
_relay1Load.setTab(_hardwareConfigTab);
_relay1Type.setTab(_hardwareConfigTab);
_relay2Load.setTab(_hardwareConfigTab);
_output1ResistanceInput.setTab(_hardwareConfigTab);
_output2ResistanceInput.setTab(_hardwareConfigTab);
_output1DimmerMapper.setTab(_hardwareConfigTab);
_output2DimmerMapper.setTab(_hardwareConfigTab);
_relay2Type.setTab(_hardwareConfigTab);
_resistanceCalibration.setTab(_hardwareConfigTab);

_gridFreq.onChange([](const char* value) {
Expand All @@ -695,12 +700,14 @@ void YaSolR::Website::begin() {
_numConfig(_displayRotation, KEY_DISPLAY_ROTATION);
_numConfig(_relay1Load, KEY_RELAY1_LOAD);
_numConfig(_relay2Load, KEY_RELAY2_LOAD);
_sliderConfig(_displaySpeed, KEY_DISPLAY_SPEED);
_textConfig(_displayType, KEY_DISPLAY_TYPE);
_textConfig(_output1DimmerType, KEY_OUTPUT1_DIMMER_TYPE);
_textConfig(_output1RelayType, KEY_OUTPUT1_RELAY_TYPE);
_textConfig(_output2DimmerType, KEY_OUTPUT2_DIMMER_TYPE);
_textConfig(_output2RelayType, KEY_OUTPUT2_RELAY_TYPE);
_textConfig(_relay1Type, KEY_RELAY1_TYPE);
_textConfig(_relay2Type, KEY_RELAY2_TYPE);
_sliderConfig(_displaySpeed, KEY_DISPLAY_SPEED);

_output1ResistanceInput.onChange([](const std::optional<float> value) {
if (value.has_value())
Expand Down Expand Up @@ -1110,38 +1117,42 @@ void YaSolR::Website::initCards() {
break;
}

_displayType.setValue(config.get(KEY_DISPLAY_TYPE));
_displaySpeed.setValue(config.getInt(KEY_DISPLAY_SPEED));
_displayRotation.setValue(config.getInt(KEY_DISPLAY_ROTATION));
_displaySpeed.setValue(config.getInt(KEY_DISPLAY_SPEED));
_displayType.setValue(config.get(KEY_DISPLAY_TYPE));
_output1DimmerType.setValue(config.get(KEY_OUTPUT1_DIMMER_TYPE));
_output1RelayType.setValue(config.get(KEY_OUTPUT1_RELAY_TYPE));
_output1ResistanceInput.setStatus(_output1ResistanceInput.value() ? dash::Status::SUCCESS : dash::Status::DANGER);
_output1ResistanceInput.setValue(config.getFloat(KEY_OUTPUT1_RESISTANCE));
_output2DimmerType.setValue(config.get(KEY_OUTPUT2_DIMMER_TYPE));
_output2RelayType.setValue(config.get(KEY_OUTPUT2_RELAY_TYPE));
_relay1Type.setValue(config.get(KEY_RELAY1_TYPE));
_relay2Type.setValue(config.get(KEY_RELAY2_TYPE));
_output2ResistanceInput.setStatus(_output2ResistanceInput.value() ? dash::Status::SUCCESS : dash::Status::DANGER);
_output2ResistanceInput.setValue(config.getFloat(KEY_OUTPUT2_RESISTANCE));
_relay1Load.setValue(load1);
_relay1Type.setValue(config.get(KEY_RELAY1_TYPE));
_relay2Load.setValue(load2);
_output1ResistanceInput.setValue(config.getFloat(KEY_OUTPUT1_RESISTANCE));
_output1ResistanceInput.setStatus(_output1ResistanceInput.value() ? dash::Status::SUCCESS : dash::Status::DANGER);
_output2ResistanceInput.setValue(config.getFloat(KEY_OUTPUT2_RESISTANCE));
_output2ResistanceInput.setStatus(_output2ResistanceInput.value() ? dash::Status::SUCCESS : dash::Status::DANGER);
_relay2Type.setValue(config.get(KEY_RELAY2_TYPE));
_output1DimmerMapper.setValue({static_cast<uint8_t>(config.getInt(KEY_OUTPUT1_DIMMER_MIN)),
static_cast<uint8_t>(config.getInt(KEY_OUTPUT1_DIMMER_MAX))});
_output2DimmerMapper.setValue({static_cast<uint8_t>(config.getInt(KEY_OUTPUT2_DIMMER_MIN)),
static_cast<uint8_t>(config.getInt(KEY_OUTPUT2_DIMMER_MAX))});
_displayType.setDisplay(config.getBool(KEY_ENABLE_DISPLAY));
_displaySpeed.setDisplay(config.getBool(KEY_ENABLE_DISPLAY));
_displayRotation.setDisplay(config.getBool(KEY_ENABLE_DISPLAY));
_relay1Load.setDisplay(relay1Enabled);
_relay2Load.setDisplay(relay2Enabled);
_output1ResistanceInput.setDisplay(dimmer1Enabled);
_output2ResistanceInput.setDisplay(dimmer2Enabled);
_displaySpeed.setDisplay(config.getBool(KEY_ENABLE_DISPLAY));
_displayType.setDisplay(config.getBool(KEY_ENABLE_DISPLAY));
_output1DimmerMapper.setDisplay(dimmer1Enabled);
_output1DimmerType.setDisplay(dimmer1Enabled);
_output1PZEMSync.setDisplay(pzem1Enabled);
_output2PZEMSync.setDisplay(pzem2Enabled);
_output1RelayType.setDisplay(config.getBool(KEY_ENABLE_OUTPUT1_RELAY));
_output1ResistanceInput.setDisplay(dimmer1Enabled);
_output2DimmerMapper.setDisplay(dimmer2Enabled);
_output2DimmerType.setDisplay(dimmer2Enabled);
_output2PZEMSync.setDisplay(pzem2Enabled);
_output2RelayType.setDisplay(config.getBool(KEY_ENABLE_OUTPUT2_RELAY));
_output2ResistanceInput.setDisplay(dimmer2Enabled);
_relay1Load.setDisplay(relay1Enabled);
_relay1Type.setDisplay(relay1Enabled);
_relay2Load.setDisplay(relay2Enabled);
_relay2Type.setDisplay(relay2Enabled);
_output1DimmerMapper.setDisplay(dimmer1Enabled);
_output2DimmerMapper.setDisplay(dimmer2Enabled);
_resistanceCalibration.setDisplay((dimmer1Enabled && jsyEnabled) ||
(dimmer1Enabled && pzem1Enabled) ||
(dimmer2Enabled && jsyEnabled) ||
Expand Down
Loading

0 comments on commit ce1f723

Please sign in to comment.