mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 02:35:40 +00:00
add TimerSeconds
This commit is contained in:
@ -372,6 +372,30 @@ int http_fn_index(http_request_t* request) {
|
||||
hprintf255(request, "Temperature Channel %s value %i C<br>", CHANNEL_GetLabel(i), iValue);
|
||||
poststr(request, "</td></tr>");
|
||||
|
||||
}
|
||||
else if (channelType == ChType_TimerSeconds) {
|
||||
|
||||
iValue = CHANNEL_Get(i);
|
||||
|
||||
poststr(request, "<tr><td>");
|
||||
hprintf255(request, "Timer Channel %s value ", CHANNEL_GetLabel(i));
|
||||
if (iValue < 60) {
|
||||
hprintf255(request, "value %i seconds<br>", iValue);
|
||||
}
|
||||
else if (iValue < 3600) {
|
||||
int minutes = iValue / 60;
|
||||
int seconds = iValue % 60;
|
||||
hprintf255(request, "value %i minutes %i seconds<br>", minutes, seconds);
|
||||
}
|
||||
else {
|
||||
int hours = iValue / 3600;
|
||||
int remainingSeconds = iValue % 3600;
|
||||
int minutes = remainingSeconds / 60;
|
||||
int seconds = remainingSeconds % 60;
|
||||
hprintf255(request, "value %i hours %i minutes %i seconds<br>", hours, minutes, seconds);
|
||||
}
|
||||
poststr(request, "</td></tr>");
|
||||
|
||||
}
|
||||
else if (channelType == ChType_Temperature_div2) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user