UI cleanup 1: confirm setting the exposure
This commit is contained in:
parent
dac720863d
commit
699c2dbec8
|
@ -91,13 +91,23 @@ cam.end = function (c, id, ms) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
cam.exposure = function (exposure) {
|
cam.exposure = async function (exposure) {
|
||||||
var obj = {
|
var obj = {
|
||||||
id : uuid(),
|
id : uuid(),
|
||||||
exposure
|
exposure
|
||||||
};
|
};
|
||||||
log.info(`Setting exposure: ${exposure}`);
|
var change = false;
|
||||||
ipcRenderer.sendSync(cam.id, obj);
|
try {
|
||||||
|
change = await gui.confirm(`Are you sure you want to set camera exposure to ${exposure}ms?`);
|
||||||
|
} catch (err) {
|
||||||
|
log.error(err);
|
||||||
|
}
|
||||||
|
if (change) {
|
||||||
|
log.info(`Setting exposure: ${exposure}`);
|
||||||
|
ipcRenderer.sendSync(cam.id, obj);
|
||||||
|
} else {
|
||||||
|
timing.updateUI('#cam_time', timing.data['cam']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cam.listen = function () {
|
cam.listen = function () {
|
||||||
|
|
Loading…
Reference in New Issue