mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-09 17:15:46 +00:00
add two new channel types - only cosmetic for display - "OpenClosed" and "OpenClosed_Inv" - for door sensors, garage door sensors, etc
This commit is contained in:
@ -534,6 +534,30 @@ int http_fn_index(http_request_t* request) {
|
||||
hprintf255(request, "Current %fA (ch %i)", fValue, i);
|
||||
poststr(request, "</td></tr>");
|
||||
}
|
||||
else if (channelType == ChType_OpenClosed) {
|
||||
iValue = CHANNEL_Get(i);
|
||||
|
||||
poststr(request, "<tr><td>");
|
||||
if (iValue) {
|
||||
hprintf255(request, "CLOSED (ch %i)", i);
|
||||
}
|
||||
else {
|
||||
hprintf255(request, "OPEN (ch %i)", i);
|
||||
}
|
||||
poststr(request, "</td></tr>");
|
||||
}
|
||||
else if (channelType == ChType_OpenClosed_Inv) {
|
||||
iValue = CHANNEL_Get(i);
|
||||
|
||||
poststr(request, "<tr><td>");
|
||||
if (!iValue) {
|
||||
hprintf255(request, "CLOSED (ch %i)", i);
|
||||
}
|
||||
else {
|
||||
hprintf255(request, "OPEN (ch %i)", i);
|
||||
}
|
||||
poststr(request, "</td></tr>");
|
||||
}
|
||||
else if (h_isChannelRelay(i) || channelType == ChType_Toggle) {
|
||||
const char* c;
|
||||
if (i <= 1) {
|
||||
|
||||
Reference in New Issue
Block a user