/branches/dongfang_FC_rewrite/ENC-03_FC1.3.c |
6,9 → 6,6 |
#include "eeprom.h" |
#include "timer0.h" |
|
#define PITCHROLL_MINLIMIT GYRO_SUMMATION_FACTOR_PITCHROLL * 510 |
#define PITCHROLL_MAXLIMIT GYRO_SUMMATION_FACTOR_PITCHROLL * 515 |
|
void I2C_OutputAmplifierOffsets(void) { |
uint16_t timeout = setDelay(2000); |
I2C_Start(TWI_STATE_GYRO_OFFSET_TX); // initiate data transmission |
/branches/dongfang_FC_rewrite/analog.c |
563,7 → 563,6 |
// Noise is relative to offset. So, reset noise measurements when changing offsets. |
for (uint8_t i=PITCH; i<=ROLL; i++) { |
gyroNoisePeak[i] = 0; |
accNoisePeak[i] = 0; |
gyroD[i] = 0; |
for (uint8_t j=0; j<GYRO_D_WINDOW_LENGTH; j++) { |
gyroDWindow[i][j] = 0; |
/branches/dongfang_FC_rewrite/flight.h |
11,6 → 11,7 |
|
#define PITCH 0 |
#define ROLL 1 |
#define YAW 2 |
|
void flight_setParameters(uint8_t _invKi, uint8_t _gyroPFactor, uint8_t _gyroIFactor, uint8_t _yawPFactor, uint8_t _yawIFactor); |
void flight_setGround(void); |
/branches/dongfang_FC_rewrite/invenSense.c |
1,4 → 1,3 |
#include "invenSense.h" |
#include "timer0.h" |
#include "configuration.h" |
|
30,7 → 29,7 |
delay_ms_with_adc_measurement(100, 0); |
} |
|
void gyro_init() { |
void gyro_init(void) { |
gyro_calibrate(); |
} |
|
/branches/dongfang_FC_rewrite/main.c |
170,7 → 170,7 |
beepI2CAlarm(); |
} |
|
// Allow Serial Data Transmit if motors must not updated or motors are not running |
// Allow serial data transmission if there is still time, or if we are not flying anyway. |
if (!runFlightControl || !(MKFlags & MKFLAG_MOTOR_RUN)) { |
usart0_transmitTxData(); |
} |
/branches/dongfang_FC_rewrite/menu.c |
9,6 → 9,7 |
#include "analog.h" |
#include "twimaster.h" |
#include "attitude.h" |
#include "menu.h" |
|
#if (!defined (USE_NAVICTRL)) |
uint8_t maxMenuItem = 13; |
27,8 → 28,7 |
#define KEY4 0x08 |
#define KEY5 0x10 |
|
#define DISPLAYBUFFSIZE 80 |
int8_t displayBuff[DISPLAYBUFFSIZE] = "Hello World"; |
int8_t displayBuff[DISPLAYBUFFSIZE]; |
uint8_t dispPtr = 0; |
|
/************************************/ |