ボタンを押すと、 バッテリ更新を停止し、 他のボタンもロックさせる
Dependencies: RemoteIR TextLCD
Revision 50:6c25bf1c39d7, committed 2020-08-27
- Comitter:
- faker_71
- Date:
- Thu Aug 27 08:20:14 2020 +0000
- Parent:
- 49:14b3dba5bd56
- Commit message:
- 0827
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 26 08:29:31 2020 +0000 +++ b/main.cpp Thu Aug 27 08:20:14 2020 +0000 @@ -952,8 +952,17 @@ strcat(webbuff, "location.reload();"); strcat(webbuff, "}"); + // + strcat(webbuff, "var button_9 = document.getElementsByTagName(\"button\");"); + + + strcat(webbuff, "function htmlacs(url) {"); strcat(webbuff, "clearInterval(si);"); + //0827 + strcat(webbuff, "for(var m=0;m<11;m++){"); + strcat(webbuff, "button_9[m].disabled=true;}"); + //0827 strcat(webbuff, "var xhr = new XMLHttpRequest();"); strcat(webbuff, "xhr.open(\"GET\", url);"); @@ -961,6 +970,10 @@ strcat(webbuff, "xhr.onreadystatechange = function(){"); strcat(webbuff, "if(this.readyState == 4 && this.status == 200){"); strcat(webbuff, "console.log(\"apologize for\");"); +////0827 + strcat(webbuff, "for(var m=0;m<10;m++){"); + strcat(webbuff, "button_9[m].disabled=false;}"); +//0827 strcat(webbuff, "var si = setInterval(battery_update,15000);"); strcat(webbuff, "}"); @@ -1078,7 +1091,7 @@ //output at command when 2000 if(((i%2047)==0) && (i>0)) { //wait_ms(10); - ThisThread::sleep_for(10); + ThisThread::sleep_for(10); //0827 100 sprintf(cmdbuff,"AT+CIPSENDBUF=%d,%d\r\n", linkID, (bufl-2048*(i/2047))>2048?2048:(bufl-2048*(i/2047))); // send IPD link channel and buffer character length. //pc.printf("\r\n++++++++++ AT+CIPSENDBUF=%d,%d ++++++++++\r\n", linkID, (bufl-2048)>2048?2048:(bufl-2048)); timeout=600;