Push dev work to master #2
|
@ -80,6 +80,12 @@
|
|||
<button id="wifi" class="" onclick="mobile.setWifi();">CONNECT</button>
|
||||
<button id="wifiRefresh" class="" onclick="mobile.getWifi();">REFRESH WIFI</button>
|
||||
</div>
|
||||
<div class="ble">
|
||||
<br />
|
||||
<button id="reset" onclick="mobile.reset();">RESET</button>
|
||||
<button id="restart" onclick="mobile.restart();">RESTART</button>
|
||||
<button id="update" onclick="mobile.update();">UPDATE</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="mscript" class="page">
|
||||
<h2>MSCRIPT</h2>
|
||||
|
|
|
@ -412,3 +412,7 @@ span.pos{
|
|||
body.mobile footer{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#reset{
|
||||
margin-top: 60px;
|
||||
}
|
|
@ -289,9 +289,11 @@ mobile.sequence = function () {
|
|||
stringToBytes(JSON.stringify(opts)), //check length?
|
||||
mobile.sequenceSuccess,
|
||||
mobile.ble.onError);
|
||||
|
||||
if (!elem.classList.contains('focus')) {
|
||||
elem.classList.add('focus');
|
||||
}
|
||||
|
||||
mobile.ble.active = true;
|
||||
};
|
||||
|
||||
|
@ -596,6 +598,25 @@ mobile.EV = function (fstop, shutter) {
|
|||
return Math.log(square / sec);
|
||||
};
|
||||
|
||||
mobile.reset = function () {
|
||||
const reset = confirm(`Reset INTVAL3 to default settings?`);
|
||||
if (!reset) return false;
|
||||
let opts = {
|
||||
type : 'reset'
|
||||
};
|
||||
ble.write(mobile.ble.device.id,
|
||||
mobile.ble.SERVICE_ID,
|
||||
mobile.ble.CHAR_ID,
|
||||
stringToBytes(JSON.stringify(opts)),
|
||||
mobile.resetSuccess,
|
||||
mobile.ble.onError);
|
||||
};
|
||||
|
||||
mobile.resetSuccess = function () {
|
||||
console.log('Reset to default settings');
|
||||
mobile.getState();
|
||||
};
|
||||
|
||||
/**
|
||||
* Mobile helper functions
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue