Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them has been replaced with a symlink. Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still be present.
53 lines
1.9 KiB
HTML
53 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
|
|
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
|
|
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
|
|
<script>
|
|
$(document).bind('pageinit', function () {
|
|
function controlHandlerMaker(name) {
|
|
return function (event, ui) {
|
|
var val = $('#' + name).val();
|
|
var checked = $('#' + name).is(":checked");
|
|
EventBridge.emitWebEvent({name: name, val: val, checked: checked});
|
|
};
|
|
}
|
|
var controls = [
|
|
'grab-distance',
|
|
'reject-distance'
|
|
];
|
|
controls.forEach(function (name) {
|
|
$('#' + name).bind('change', controlHandlerMaker(name));
|
|
});
|
|
EventBridge.scriptEventReceived.connect(function (msg) {
|
|
var array = JSON.parse(msg);
|
|
array.forEach(function (obj) {
|
|
var widget = $('#' + obj.name);
|
|
if (widget) {
|
|
if (widget.attr('type') === "checkbox") {
|
|
$('#' + obj.name).prop('checked', obj.checked).checkboxradio('refresh');
|
|
} else if (widget.attr('type') === "number") {
|
|
$('#' + obj.name).val(obj.val).slider('refresh');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
EventBridge.emitWebEvent({name: 'init-complete'});
|
|
});
|
|
</script>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<body>
|
|
<div style="margin:10px">
|
|
<h1>Handshake v2 Parameters</h1>
|
|
|
|
<label for="grab-distance">Grab Distance (cm)</label>
|
|
<input type="range" name="grab-distance" id="grab-distance" value="20" min="0" max="50">
|
|
|
|
<label for="reject-distance">Reject Grab Distance (cm)</label>
|
|
<input type="range" name="reject-distance" id="reject-distance" value="50" min="0" max="50">
|
|
|
|
</div>
|
|
</body>
|
|
</head>
|
|
</html>
|