Fix channel limiting

10.7.0-preview
Anisotropic 2019-10-23 00:01:19 +03:00
parent 1e2cf3f564
commit 02c98ae43e
1 changed files with 4 additions and 3 deletions

View File

@ -397,12 +397,13 @@ TABS.auxiliary.initialize = function (callback) {
});
function box_highlight(auxChannelIndex, channelPosition) {
function limit_channel(channelPosition) {
if (channelPosition < 900) {
channelPosition = 900;
} else if (channelPosition > 2100) {
channelPosition = 2100;
}
return channelPosition;
}
function update_marker(auxChannelIndex, channelPosition) {
@ -486,9 +487,9 @@ TABS.auxiliary.initialize = function (callback) {
var auxChannelCount = RC.active_channels - 4;
for (var i = 0; i < (auxChannelCount); i++) {
box_highlight(i, RC.channels[i + 4]);
update_marker(i, RC.channels[i + 4]);
update_marker(i, limit_channel(RC.channels[i + 4]));
}
}
/**