Skip to content

Commit

Permalink
console_layout, channel 9, 17 etc., minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bannsaenger committed Dec 21, 2023
1 parent 1dda9f3 commit cc199a2
Show file tree
Hide file tree
Showing 5 changed files with 5,419 additions and 3,141 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ There a two acepted commands:
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
* (Bannsaenger) fixed console_layout.json
* (Bannsaenger) fixed sending items on channel 9, 17 etc.
* (Bannsaenger) use extendObject instead of Create......
* (Bannsaenger) updated dependencies

### 0.6.3 (2023-02-27)
* (Bannsaenger) updated dependencies
* (Bannsaenger) fixed bank and channel switching
Expand Down
4 changes: 0 additions & 4 deletions lib/console_layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@
"transport.play",
"transport.record",
"transport.scrub",
"page.faderBankDec",
"page.faderBankInc",
"page.channelDec",
"page.channelInc",
"navigation.up",
"navigation.left",
"navigation.zoom",
Expand Down
9 changes: 5 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* iobroker x-touch Adapter
*
* Copyright (c) 2020-2022, Bannsaenger <bannsaenger@gmx.de>
* Copyright (c) 2020-2023, Bannsaenger <bannsaenger@gmx.de>
*
* MIT License
*
Expand Down Expand Up @@ -1107,7 +1107,7 @@ class XTouch extends utils.Adapter {
if ((actDeviceGroup == self.devices[device].memberOfGroup) &&
(selectedBank == self.devices[device].activeBank) &&
(Number(realChannel) >= self.devices[device].activeBaseChannel) &&
(Number(realChannel) <= (self.devices[device].activeBaseChannel + 8))) { // only if fader seen on console
(Number(realChannel) < (self.devices[device].activeBaseChannel + 8))) { // only if fader seen on console
//self.log.info(`send fader ${channelInBank} to ${device} value ${logObj.midiValue}`);
self.deviceSendData(midiCommand, self.devices[device].ipAddress, self.devices[device].port);
}
Expand Down Expand Up @@ -1196,7 +1196,7 @@ class XTouch extends utils.Adapter {
if ((actDeviceGroup == self.devices[device].memberOfGroup) &&
(selectedBank == self.devices[device].activeBank) &&
(Number(realChannel) >= self.devices[device].activeBaseChannel) &&
(Number(realChannel) <= (self.devices[device].activeBaseChannel + 8)) &&
(Number(realChannel) < (self.devices[device].activeBaseChannel + 8)) &&
(self.devices[device].connection)) { // only if display seen on console and device connected
self.deviceSendData(midiCommand, self.devices[device].ipAddress, self.devices[device].port);
}
Expand Down Expand Up @@ -1268,7 +1268,7 @@ class XTouch extends utils.Adapter {
if ((actDeviceGroup == self.devices[device].memberOfGroup) &&
(selectedBank == self.devices[device].activeBank) &&
(Number(realChannel) >= self.devices[device].activeBaseChannel) &&
(Number(realChannel) <= (self.devices[device].activeBaseChannel + 8)) &&
(Number(realChannel) < (self.devices[device].activeBaseChannel + 8)) &&
(self.devices[device].connection)) {
// only if display seen on console and device connected
self.deviceSendData(midiCommand1, self.devices[device].ipAddress, self.devices[device].port);
Expand Down Expand Up @@ -2272,6 +2272,7 @@ class XTouch extends utils.Adapter {
if (!importFiles.includes(importFile)) throw({'message': `File "${importFile}" does not exist in directory`});
// try to read the file
importContent = await self.readFileAsync('x-touch.0', importFile);
// @ts-ignore
importJson = JSON.parse(importContent.data.toString());
self.log.debug(`File "${importFile}" red`);
}
Expand Down
Loading

0 comments on commit cc199a2

Please sign in to comment.