Implement CPPM reception. Keep it as an option for now.
Recalibrate the radio, as the timings have changed. And, it seems a couple of channels are now swapped with the new radio. Or rather, unswapped. So fix the channel map to match.
This commit is contained in:
34
stick.c
34
stick.c
@@ -19,30 +19,30 @@
|
||||
#define TWO_PI 6.28318531f
|
||||
#define PI 3.14159265f
|
||||
|
||||
#define MIN_X 14700
|
||||
#define MAX_X 29700
|
||||
#define CENTRE_X 22200
|
||||
#define MIN_X 8720
|
||||
#define MAX_X 23800
|
||||
#define CENTRE_X 16260
|
||||
|
||||
#define MIN_Y 14700
|
||||
#define MAX_Y 29700
|
||||
#define CENTRE_Y 22200
|
||||
#define MIN_Y 8720
|
||||
#define MAX_Y 23800
|
||||
#define CENTRE_Y 16260
|
||||
|
||||
#define MIN_Z 14700
|
||||
#define MAX_Z 29700
|
||||
#define CENTRE_Z 22200
|
||||
#define MIN_Z 8720
|
||||
#define MAX_Z 23800
|
||||
#define CENTRE_Z 16300
|
||||
|
||||
#define MIN_THR 15700
|
||||
#define MAX_THR 29700
|
||||
#define MIN_THR 9720
|
||||
#define MAX_THR 23750
|
||||
|
||||
#define MIN_REAL_THR 14700
|
||||
#define MIN_REAL_THR 8720
|
||||
|
||||
#define CENTRE_ZONE 100
|
||||
|
||||
/* With new TX firmware:
|
||||
/* With new TX firmware, CPPM:
|
||||
* x y thr z
|
||||
* centre: 22192, 22222, 14687, 22196
|
||||
* min: 14686, 14701, 14686, 14687
|
||||
* max: 29740, 29740, 29725, 29725
|
||||
* centre: 16260, 16258, 16000, 16300
|
||||
* min: 8720, 8718, 8720, 8722
|
||||
* max: 23790, 23817, 23750, 23803
|
||||
*/
|
||||
|
||||
/* Full scale is a roll/pitch angle of 30 degrees from the vertical */
|
||||
@@ -112,7 +112,7 @@ void stick_input(void) {
|
||||
z = timer_input(3);
|
||||
|
||||
#ifdef STICK_DEBUG_CALIBRATE
|
||||
if ((stick_counter % 20) == 0)
|
||||
if ((stick_counter % 100) == 0)
|
||||
stick_debug_calibrate();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user