Skip to content

Commit 5c14a31

Browse files
stefanbodearendst
andauthored
Shutter esp32 support up to 16 shutters (#18295)
* Updates to support ESP32 shutter compiler option * New ESP32 shutter driver * Update xdrv_27_ESP32_shutter.ino * Update xdrv_27_shutter.ino * Update support_command.ino * Update xdrv_27_shutter.ino Fix compile error * Update xdrv_27_ESP32_shutter.ino Fix compile error * Update xdrv_27_shutter.ino Fix compile error --------- Co-authored-by: Theo Arends <[email protected]>
1 parent b321fab commit 5c14a31

File tree

3 files changed

+2099
-23
lines changed

3 files changed

+2099
-23
lines changed

tasmota/tasmota_support/support_command.ino

+2-18
Original file line numberDiff line numberDiff line change
@@ -917,24 +917,8 @@ void CmndStatus(void)
917917
}
918918

919919
#ifdef USE_SHUTTER
920-
if (Settings->flag3.shutter_mode) {
921-
if ((0 == payload) || (13 == payload)) {
922-
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS13_SHUTTER "\":{"));
923-
for (uint32_t i = 0; i < MAX_SHUTTERS; i++) {
924-
if (0 == Settings->shutter_startrelay[i]) { break; }
925-
if (i > 0) { ResponseAppend_P(PSTR(",")); }
926-
ResponseAppend_P(PSTR("\"" D_STATUS13_SHUTTER "%d\":{\"Relay1\":%d,\"Relay2\":%d,\"Open\":%d,\"Close\":%d,"
927-
"\"50perc\":%d,\"Delay\":%d,\"Opt\":\"%s\","
928-
"\"Calib\":[%d,%d,%d,%d,%d],"
929-
"\"Mode\":\"%d\"}"),
930-
i, Settings->shutter_startrelay[i], Settings->shutter_startrelay[i] +1, Settings->shutter_opentime[i], Settings->shutter_closetime[i],
931-
Settings->shutter_set50percent[i], Settings->shutter_motordelay[i], GetBinary8(Settings->shutter_options[i], 4).c_str(),
932-
Settings->shuttercoeff[0][i], Settings->shuttercoeff[1][i], Settings->shuttercoeff[2][i], Settings->shuttercoeff[3][i], Settings->shuttercoeff[4][i],
933-
Settings->shutter_mode);
934-
}
935-
ResponseJsonEndEnd();
936-
CmndStatusResponse(13);
937-
}
920+
if ((0 == payload) || (13 == payload)) {
921+
if (ShutterStatus()) { CmndStatusResponse(13); }
938922
}
939923
#endif
940924

0 commit comments

Comments
 (0)