Add the ability to detect a single capper device

This commit is contained in:
Matt McWilliams 2022-07-17 09:57:52 -04:00
parent 6582154ec6
commit 3f759f5678
3 changed files with 19 additions and 1 deletions

View File

@ -362,6 +362,16 @@ class Devices {
return false;
}
}
else if (type === 'capper') {
this.connected.capper = device;
try {
connectSuccess = await this.arduino.connect('capper', device, false);
}
catch (err) {
this.log.error('Error connecting capper', err);
return false;
}
}
else if (type === 'camera,capper') {
this.connected.camera = device;
this.connected.capper = device;

File diff suppressed because one or more lines are too long

View File

@ -351,6 +351,14 @@ class Devices {
this.log.error('Error connecting to camera, camera_second, projector and projector_second', err)
return false
}
} else if (type === 'capper') {
this.connected.capper = device
try {
connectSuccess = await this.arduino.connect('capper', device, false)
} catch (err) {
this.log.error('Error connecting capper', err)
return false
}
} else if (type === 'camera,capper') {
this.connected.camera = device
this.connected.capper = device