complete api mapping

This commit is contained in:
Stewart Allen 2024-09-17 10:40:42 -04:00
commit 683c117bcd
5 changed files with 25 additions and 26 deletions

View file

@ -9,21 +9,25 @@ gapp.register("kiri.devices", (root, exports) => {
let { kiri } = root,
{ api, conf } = kiri;
api.show.devices = showDevices;
// extend API
Object.assign(api.show, {
showDevices
});
api.device = {
Object.assign(api.device, {
clone: cloneDevice,
code: currentDeviceCode,
get: currentDeviceName,
set: selectDevice,
isBelt
};
});
api.devices = {
Object.assign(api.devices, {
show: showDevices,
select: selectDevice,
refresh: updateDeviceList
};
refresh: updateDeviceList,
update_laser_state: updateLaserState
});
function isBelt() {
return api.conf.get().device.bedBelt;