Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2056 → Rev 2057

/branches/dongfang_FC_rewrite/directGPSNaviControl.c
3,11 → 3,6
#include <inttypes.h>
#include <stdlib.h>
#include <stddef.h>
//#include "mymath.h"
//#include "timer0.h"
//#include "uart1.h"
//#include "rc.h"
//#include "eeprom.h"
#include "ubx.h"
#include "configuration.h"
#include "controlMixer.h"
/branches/dongfang_FC_rewrite/flight.c
216,6 → 216,7
* Apply "dynamic stability" - that is: Limit pitch and roll terms to a growing function of throttle and yaw(!).
* The higher the dynamic stability parameter, the wider the bounds. 64 seems to be a kind of unity
* (max. pitch or roll term is the throttle value).
* OOPS: Is not applied at all.
* TODO: Why a growing function of yaw?
*/
if (term[axis] < -tmp_int) {
/branches/dongfang_FC_rewrite/uart0.c
248,12 → 248,6
rxd_buffer[ptr_rxd_buffer++] = c; // copy 1st byte to buffer
checksum = c; // init checksum
}
#if 0
else if (ptr_rxd_buffer == 1) { // handle address
rxd_buffer[ptr_rxd_buffer++] = c; // copy byte to rxd buffer
checksum += c; // update checksum
}
#endif
else if (ptr_rxd_buffer < RXD_BUFFER_LEN) { // collect incomming bytes
if (c != '\r') { // no termination character
rxd_buffer[ptr_rxd_buffer++] = c; // copy byte to rxd buffer
296,8 → 290,8
tmpchecksum += txd_buffer[i];
}
tmpchecksum %= 4096;
txd_buffer[i++] = '=' + tmpchecksum / 64;
txd_buffer[i++] = '=' + tmpchecksum % 64;
txd_buffer[i++] = '=' + tmpchecksum >> 6;
txd_buffer[i++] = '=' + tmpchecksum & 0x3F;
txd_buffer[i++] = '\r';
txd_complete = FALSE;
UDR0 = txd_buffer[0]; // initiates the transmittion (continued in the TXD ISR)