2
Dependencies: RemoteIR TextLCD
Diff: main.cpp
- Revision:
- 62:5b4e62edaac4
- Parent:
- 61:85daf80c7727
- Child:
- 63:bddf342bce22
--- a/main.cpp Mon Sep 07 05:27:16 2020 +0000 +++ b/main.cpp Mon Sep 07 06:28:58 2020 +0000 @@ -4,7 +4,7 @@ */ /* - Version 0.04 + Version 0.05 Date 2020/09/07 Uploader Taku Nishimura @@ -948,22 +948,15 @@ strcpy(webbuff, "<!DOCTYPE html>"); strcat(webbuff, "<html><head><title>RobotCar</title><meta name='viewport' content='width=device-width'/>"); //strcat(webbuff, "<meta http-equiv=\"refresh\" content=\"5\"; >"); - strcat(webbuff, "<style type=\"text/css\">.noselect{ width:100px;height:60px;}.light{ width:100px;height:60px;background-color:#00ff66;}.load{ width: 50px; height: 30px;font-size:10px}</style>"); + strcat(webbuff, "<style type=\"text/css\">.noselect{ width:100px;height:60px;border-radius: 25px;outline:0;}.light{ width:100px;height:60px;background-color:#00ff66;border-radius: 25px;outline:0;}.load{ width: 50px; height: 30px;font-size:10px}</style>"); strcat(webbuff, "</head><body><center><p><strong>Robot Car Remote Controller"); strcat(webbuff, "</strong></p><td style='vertical-align:top;'><strong>Battery level "); - if(b >= 70) { //残電量表示 - strcat(webbuff, "<font color=\"blue\">"); - sprintf(webbuff, "%s%3d", webbuff, b); - strcat(webbuff, "</font>"); - } - else if(b >= 40) { - strcat(webbuff, "<font color=\"orange\">"); - sprintf(webbuff, "%s%3d", webbuff, b); - strcat(webbuff, "</font>"); - } else { //30%より下の場合残電量を赤文字 + if(b<=30){ //30%より下の場合残電量を赤文字 strcat(webbuff, "<font color=\"red\">"); sprintf(webbuff, "%s%3d", webbuff, b); strcat(webbuff, "</font>"); + }else{ + sprintf(webbuff, "%s%3d", webbuff, b); } strcat(webbuff, "%</strong>"); strcat(webbuff, "<button id=\"reloadbtn\" type=\"button\" class=\"load\" onclick=\"location.reload()\">RELOAD</button>");