Backup before extended trims function merge
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Author - Erez Raviv <erezraviv@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* ============================================================
|
||||
* Templates file
|
||||
*
|
||||
* eccpm
|
||||
* crow
|
||||
* throttle cut
|
||||
* flaperon
|
||||
* elevon
|
||||
* v-tail
|
||||
* throttle hold
|
||||
* Aileron Differential
|
||||
* Spoilers
|
||||
* Snap Roll
|
||||
* ELE->Flap
|
||||
* Flap->ELE
|
||||
*
|
||||
*
|
||||
*
|
||||
* =============================================================
|
||||
* Assumptions:
|
||||
* All primary channels are per modi12x3
|
||||
* Each template added to the end of each channel
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TEMPLATES_H
|
||||
#define TEMPLATES_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
#define STK_RUD 1
|
||||
#define STK_ELE 2
|
||||
#define STK_THR 3
|
||||
#define STK_AIL 4
|
||||
#define STK_P1 5
|
||||
#define STK_P2 6
|
||||
#define STK_P3 7
|
||||
#define NUM_TEMPLATES DIM(n_Templates)
|
||||
#define NUM_TEMPLATE_MIX 8
|
||||
#define TEMPLATE_NLEN 15
|
||||
|
||||
#define TRIM_ON 0
|
||||
#define TRIM_OFF 1
|
||||
|
||||
#define CM(x) (CONVERT_MODE(x)) //good for SRC
|
||||
#define CH(x) (CHOUT_BASE+(x))
|
||||
#define CV(x) (CURVE_BASE+(x)-1)
|
||||
#define CC(x) (CHANNEL_ORDER(x)) //need to invert this to work with dest
|
||||
|
||||
#define CURVE5(x) ((x)-1)
|
||||
#define CURVE9(x) (MAX_CURVE5+(x)-1)
|
||||
|
||||
const char n_Templates[][TEMPLATE_NLEN] = {
|
||||
"Simple 4-CH",
|
||||
"T-Cut",
|
||||
"V-Tail",
|
||||
"Elevon\\Delta",
|
||||
"eCCPM",
|
||||
"Heli Setup",
|
||||
"Servo Test"
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
void clearMixes();
|
||||
void clearCurves();
|
||||
void applyTemplate(uint8_t idx);
|
||||
|
||||
|
||||
#endif //TEMPLATES_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user