Upgrading to NIMMSTA Web Library 6.x
This guide helps you upgrading to NIMMSTA Web Library 6.x.
1. Upgrade JavaScript file
Use the following JavaScript file instead of the bundle:
2. GetConnectedDevicesAction removed
GetConnectedDevicesAction has been removed and can now be found in GetDevicesAction. GetDevicesAction can be invoked with a filter to get specific devices. If you don't invoke the action with a filter the default filter "CONNECTED" is used so it behaves like the old GetConnectedDevicesAction.
DeviceFilter looks like this:
and can be used the following way:// With default (CONNECTED) filter
connectionManager.getDevices().then((response) => {
console.log('Connected devices', response.devices);
});
// With different filter
connectionManager.getDevices(DeviceFilter.ALL).then((response) => {
console.log('Devices', response.devices);
});
3. Multi device
With version 6.0 multi device is officially supported and can be activated to connect up to 6 HS-50.
4. Trigger imager
You can now trigger the imager on the HS-50 programmatically.
device.triggerImager(duration: number).then(() => {
console.log('Successfully triggered imager');
}).catch(error => {
console.error('Error triggering imager');
});
5. Stop reconnecting
You can now stop reconnecting to a specific device if the connection was lost.
device.stopReconnecting().then(() => {
console.log('Successfully stopped reconnecting');
}).catch(error => {
console.error('Error stopping reconnecting');
});
6. Predefined layouts
There are 5 new predefined layouts: CounterLayout, NumpadLayout, OneCellHeaderLayout, TwoCellHeaderLayout and ThreeCellHeaderLayout.
Go to the Layout Documentation to see how they look.