mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-07 15:57:51 +01:00
add ability to hide certain channels from HTTP panel by script
This commit is contained in:
@@ -202,6 +202,10 @@ int http_fn_testmsg(http_request_t* request) {
|
||||
|
||||
}
|
||||
|
||||
// bit mask telling which channels are hidden from HTTP
|
||||
// If given bit is set, then given channel is hidden
|
||||
extern int g_hiddenChannels;
|
||||
|
||||
int http_fn_index(http_request_t* request) {
|
||||
int j, i;
|
||||
char tmpA[128];
|
||||
@@ -330,6 +334,10 @@ int http_fn_index(http_request_t* request) {
|
||||
int channelType;
|
||||
|
||||
channelType = CHANNEL_GetType(i);
|
||||
// check ability to hide given channel from gui
|
||||
if (BIT_CHECK(g_hiddenChannels, i)) {
|
||||
continue; // hidden
|
||||
}
|
||||
if (h_isChannelRelay(i) || channelType == ChType_Toggle) {
|
||||
if (i <= 1) {
|
||||
hprintf255(request, "<tr>");
|
||||
@@ -367,6 +375,11 @@ int http_fn_index(http_request_t* request) {
|
||||
|
||||
int channelType;
|
||||
|
||||
// check ability to hide given channel from gui
|
||||
if (BIT_CHECK(g_hiddenChannels, i)) {
|
||||
continue; // hidden
|
||||
}
|
||||
|
||||
channelType = CHANNEL_GetType(i);
|
||||
if (channelType == ChType_Temperature) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user