Skip to content

Commit

Permalink
improve website layout
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-8 committed Sep 27, 2024
1 parent 3a5f10b commit 2d0d26c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gbg_program/_wifi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void runWifiInput(float& speedInput, float& turnInput) {
}
break;
case 1:
if (deactivateIfRemoteDisconnects && ((millis() - lastRemoteCommandMillis) > signalLossTimeout)) {
if (((millis() - lastRemoteCommandMillis) > signalLossTimeout)) { // timeout must be on in remote control mode (also enforced on website end)
speedInput = 0;
turnInput = 0;
} else {
Expand Down
13 changes: 6 additions & 7 deletions gbg_program/_wifi_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,20 @@
<div id="status" style="font-size: 50px;">status: </div>
<br>
<br>
<div>remote override mode</div>
<div style="font-size: x-large;">remote override mode</div>
<input type="radio" id="ctl-car" name="remote-mode" value="0" checked
onclick='document.getElementById("timeout").disabled=false;document.getElementById("timeout").checked=timeoutWasChecked;sendTimeout();sendRemoteMode(0);' />
<label for="ctl-car">car has control</label>
<label for="ctl-car" style="font-size: x-large;">car has control</label>
<br>
<input type="radio" id="ctl-remote" name="remote-mode" value="1"
onclick='document.getElementById("timeout").disabled=true;timeoutWasChecked=document.getElementById("timeout").checked;document.getElementById("timeout").checked=true;sendTimeout();sendRemoteMode(1);' />
<label for="ctl-remote">remote has control</label>
<label for="ctl-remote" style="font-size: x-large;">remote has control</label>
<br>
<br>
<input type="checkbox" id='timeout' onclick='sendTimeout();' style='font-size: 100px;'>deactivate if signal
lost</button>
<br>
<input type="checkbox" id='timeout' onclick='sendTimeout();'></input>
<label for="timeout" style="font-size: larger;">deactivate if signal lost</label>

<div id="joyDiv" style="width:200px;height:200px;margin:100px"></div>
<div id="joyDiv" style="width:500px;height:500px;margin:200px;float: right;"></div>

</body>
<script>
Expand Down

0 comments on commit 2d0d26c

Please sign in to comment.