/branches/dongfang_FC_rewrite/configuration.h |
---|
84,11 → 84,9 |
*/ |
typedef struct { |
uint8_t trim; |
uint8_t variableOffset; |
uint8_t channels[MAX_CHANNELS]; |
} ChannelMap_t; |
extern ChannelMap_t channelMap; |
} channelMap_t; |
extern channelMap_t channelMap; |
typedef struct { |
char name[12]; |
106,7 → 104,7 |
uint8_t minValue; |
uint8_t maxValue; |
uint8_t flags; |
} Servo_t; |
} servo_t; |
#define SERVO_STABILIZATION_REVERSE 1 |
198,7 → 196,7 |
// Servos |
uint8_t servoCount; |
uint8_t servoManualMaxSpeed; |
Servo_t servoConfigurations[2]; // [PITCH, ROLL] |
servo_t servoConfigurations[2]; // [PITCH, ROLL] |
// Outputs |
output_flash_t outputFlash[2]; |
/branches/dongfang_FC_rewrite/timer2.c |
---|
97,6 → 97,15 |
/***************************************************** |
* Control Servo Position |
*****************************************************/ |
/*typedef struct { |
uint8_t manualControl; |
uint8_t compensationFactor; |
uint8_t minValue; |
uint8_t maxValue; |
uint8_t flags; |
} servo_t;*/ |
int16_t calculateStabilizedServoAxis(uint8_t axis) { |
int32_t value = attitude[axis] >> STABILIZATION_LOG_DIVIDER; // between -500000 to 500000 extreme limits. Just about |
// With full blast on stabilization gain (255) we want to convert a delta of, say, 125000 to 2000. |
/branches/dongfang_FC_rewrite/timer2.h |
---|
3,6 → 3,9 |
#include <inttypes.h> |
extern volatile int16_t ServoNickValue; |
extern volatile int16_t ServoRollValue; |
void timer2_init(void); |
void calculateServoValues(void); |
#endif //_TIMER2_H |