Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-ls authored May 1, 2018
1 parent f11a67e commit 93a2c3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<body>
<!--<div style="width: 100px;height:40px;padding:3px;background-color:#3853DC;border-radius:3px;position:fixed;top:0;right:650px;z-index:10000000;text-align: center;font-size:.75em" onclick="start();">Turn on Party Mode!</div>-->
<div id="reconnect">Reset Robot Connection</div>
<div id="shift">
<article class="field">
<div id="position" class="point">
Expand Down Expand Up @@ -153,12 +154,12 @@
<label class="item">Right: <input id="right" type="radio" name="pos"></label>
<label class="item"><input id="done" type="submit" name="side" value="Done"></label>
</div>
<!--<div class="greybox" style="z-index: 123499;">
<div class="greybox" style="z-index: 123499;">
<div id="login">
<input id="connect-address" type="text" value="roborio-4738-FRC.local" disabled>
<button id="connect" disabled>Connecting</button>
</div>
</div>-->
</div>
<!--<script type="text/javascript" src="test.js"></script> testing movement-->
<script type="text/javascript" src="party.js"></script>
<script src="tryIPC.js"></script>
Expand Down
10 changes: 9 additions & 1 deletion ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,17 @@ function onRobotConnection(connected) {
}
}

document.addEventListener("click",reconnect);

function reconnect () {
if (e.target.id==="reconnect") {
ipc.send('connect', 'roborio-4738-FRC.local');
}
}

/**** KEY Listeners ****/

// Gyro rotation
// Gyro rotatione
let updateGyro = (key, value) => {
ui.gyro.val = value;
ui.gyro.visualVal = Math.floor(ui.gyro.val - ui.gyro.offset);
Expand Down

1 comment on commit 93a2c3f

@nick-ls
Copy link
Contributor Author

@nick-ls nick-ls commented on 93a2c3f May 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to add a commit message, here it is:
Added a reconnect button. It should work in theory

Please sign in to comment.