mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 00:35:20 +03:00
Intermediate commit.
Not currently working
This commit is contained in:
parent
553bde1b37
commit
372dcae919
4 changed files with 87 additions and 14 deletions
|
@ -3,7 +3,8 @@
|
|||
|
||||
let OutputMappingCollection = function () {
|
||||
let self = {},
|
||||
data = [];
|
||||
data = [],
|
||||
timerOverrides = {};
|
||||
|
||||
const TIM_USE_ANY = 0;
|
||||
const TIM_USE_PPM = 0;
|
||||
|
@ -19,6 +20,26 @@ let OutputMappingCollection = function () {
|
|||
const OUTPUT_TYPE_MOTOR = 0;
|
||||
const OUTPUT_TYPE_SERVO = 1;
|
||||
|
||||
const TIMER_OUTPUT_MODE_AUTO = 0;
|
||||
const TIMER_OUTPUT_MODE_MOTORS = 1;
|
||||
const TIMER_OUTPUT_MODE_SERVOS = 2;
|
||||
|
||||
self.flushTimerOverrides = function() {
|
||||
timerOverrides = {};
|
||||
}
|
||||
|
||||
self.setTimerOverride = function (timer, outputMode) {
|
||||
timerOverrides[timer] = outputMode;
|
||||
}
|
||||
|
||||
self.getTimerOverride = function (timer) {
|
||||
timerOverrides[timer] = outputMode;
|
||||
}
|
||||
|
||||
self.getTimerOverrideIds = function (timer) {
|
||||
return Object.keys(timerOverrides).sort((a, b) => a - b);
|
||||
}
|
||||
|
||||
function getTimerMap(isMR, motors, servos) {
|
||||
let timerMap = [],
|
||||
motorsToGo = motors,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue