mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-07 21:25:29 +00:00
respect CHANNEL_MAX in channels API
This commit is contained in:
@ -757,9 +757,6 @@ static int http_rest_get_pins(http_request_t* request) {
|
||||
|
||||
static int http_rest_get_channelTypes(http_request_t* request) {
|
||||
int i;
|
||||
int maxToPrint;
|
||||
|
||||
maxToPrint = 32;
|
||||
|
||||
http_setup(request, httpMimeTypeJson);
|
||||
poststr(request, "{\"typenames\":[");
|
||||
@ -773,7 +770,7 @@ static int http_rest_get_channelTypes(http_request_t* request) {
|
||||
}
|
||||
poststr(request, "],\"types\":[");
|
||||
|
||||
for (i = 0; i < maxToPrint; i++) {
|
||||
for (i = 0; i < CHANNEL_MAX; i++) {
|
||||
if (i) {
|
||||
hprintf255(request, ",%d", g_cfg.pins.channelTypes[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user