diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 8fde85bd8..b9ef52833 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -210,6 +210,23 @@ int http_fn_index(http_request_t *request) { hprintf128(request,"%s",j,check,types[j]); } hprintf128(request,""); + hprintf128(request,"
"); + } else if(channelType == ChType_OffLowMidHigh) { + const char *types[]={"Off","Low","Mid","High"}; + int iValue; + iValue = CHANNEL_Get(i); + + hprintf128(request,"

Select speed:

"); + hprintf128(request,"",i); + for(j = 0; j < 4; j++) { + const char *check; + if(j == iValue) + check = "checked"; + else + check = ""; + hprintf128(request,"%s",j,check,types[j]); + } + hprintf128(request,"
"); hprintf128(request,"
"); } else if(channelType == ChType_TextField) { int iValue; diff --git a/src/new_pins.c b/src/new_pins.c index c4f28480e..9d9c83c3b 100644 --- a/src/new_pins.c +++ b/src/new_pins.c @@ -838,6 +838,8 @@ int CHANNEL_ParseChannelType(const char *s) { return ChType_Dimmer; if(!stricmp(s,"LowMidHigh") ) return ChType_LowMidHigh; + if(!stricmp(s,"OffLowMidHigh") ) + return ChType_OffLowMidHigh; if(!stricmp(s,"default") ) return ChType_Default; if(!stricmp(s,"TextField") ) diff --git a/src/new_pins.h b/src/new_pins.h index e2b3f6b30..4f8005401 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -47,6 +47,7 @@ enum ChannelType { ChType_LowMidHigh, ChType_TextField, ChType_ReadOnly, + ChType_OffLowMidHigh, };