17,10 → 17,10 |
#include "fc.h" |
#include "_Settings.h" |
#include "rc.h" |
#ifdef USE_KILLAGREG |
#if defined (USE_KILLAGREG) || defined (USE_MK3MAG) |
#include "ubx.h" |
#endif |
#if !defined(USE_KILLAGREG) && !defined (USE_NAVICTRL) |
#ifdef USE_MK3MAG |
#include "mk3mag.h" |
#endif |
|
57,7 → 57,7 |
|
int16_t Debug_Timer; |
|
#if !defined (USE_KILLAGREG) && !defined (USE_NAVICTRL) |
#ifdef USE_MK3MAG |
int16_t Compass_Timer; |
#endif |
|
163,7 → 163,7 |
|
Debug_Timer = SetDelay(200); |
|
#if !defined (USE_KILLAGREG) && !defined (USE_NAVICTRL) |
#ifdef USE_MK3MAG |
Compass_Timer = SetDelay(220); |
#endif |
|
206,7 → 206,7 |
|
c = UDR0; // catch the received byte |
|
#ifdef USE_KILLAGREG |
#if defined (USE_KILLAGREG) || defined (USE_MK3MAG) |
// If the FC 1.0 cpu is used the ublox module should be conneced to rxd of the 1st uart. |
// The FC 1.1 /1.2 has the ATMEGA644p cpu with a 2nd uart to which the ublox should be connected. |
#if defined (__AVR_ATmega644P__) |
214,7 → 214,7 |
#else |
ubx_parser(c); |
#endif |
#endif // USE_KILLAGREG |
#endif |
|
if(rxd_buffer_locked) return; // if rxd buffer is locked immediately return |
|
355,7 → 355,7 |
|
switch(rxd_buffer[2]) |
{ |
#if !defined (USE_KILLAGREG) && !defined (USE_NAVICTRL) |
#ifdef USE_MK3MAG |
case 'K':// Compass value |
Decode64((uint8_t *) &tmp_int_arr1[0], sizeof(tmp_int_arr1), 3, ReceivedBytes); |
CompassHeading = tmp_int_arr1[0]; |
460,7 → 460,7 |
RequestExternalControl = FALSE; |
} |
|
#if !defined (USE_KILLAGREG) && !defined (USE_NAVICTRL) |
#ifdef USE_MK3MAG |
if((CheckDelay(Compass_Timer)) && txd_complete) |
{ |
ToMk3Mag.Attitude[0] = (int16_t) (IntegralPitch / 108); // approx. 0,1 Deg |