/trunk/GPS.h |
---|
26,6 → 26,12 |
u8 UpdateMask; |
} __attribute__((packed)) CAM_Orientation_t; |
typedef struct |
{ |
s32 x; |
s32 y; |
} __attribute__((packed)) Vec2D_t; |
extern CAM_Orientation_t CAM_Orientation; |
extern Point_t* GPS_pWaypoint; |
extern u8 MaxNumberOfWaypoints; // should be 32 |
38,6 → 44,8 |
extern u8 MK_FlyingWithGps; |
extern u8 CurrentlyFlyingWaypoints; |
extern void ConfirmGpsUpdateRate(u16); |
extern int PointPolyCheck( Vec2D_t P, Vec2D_t* V, int n ); |
extern u8 UpdateFlyzoneTimer; |
void GPS_Init(void); |
void GPS_Navigation(gps_data_t *pGPS_Data, GPS_Stick_t* pGPS_Stick); |
/trunk/main.c |
---|
119,6 → 119,8 |
u8 IO1_Function = 0; |
s16 LuftdruckTemperaturKompensation = 0, LuftdruckTemperaturOffset = 0; |
u8 BaroCalState = 0; |
u8 ErrorOutSideOperationArea = 0; // I am outside the operation polygon area |
u32 ShowNoFlyzoneErrorMessage = 0; |
//---------------------------------------------------------------------------------------------------- |
void SCU_Config(void) |
440,6 → 442,13 |
sprintf(ErrorMSG,"FAILSAFE pos.! "); |
newErrorCode = 35; |
} |
else if(ErrorOutSideOperationArea && FC_is_Calibrated) |
{ |
LED_RED_ON; |
sprintf(ErrorMSG,"ERR:Outside Flyzone "); |
newErrorCode = 44; |
DebugOut.StatusRed |= AMPEL_NC; |
} |
else if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_ERROR) |
{ |
sprintf(ErrorMSG,"ERR:Redundancy "); |
463,6 → 472,13 |
sprintf(ErrorMSG,"ACC not calib."); |
newErrorCode = 42; |
} |
else |
if(ShowNoFlyzoneErrorMessage > 5) |
{ |
LED_RED_ON; |
sprintf(ErrorMSG,"ERR: no Flyzone "); |
newErrorCode = 45; |
} |
else // no error occured |
{ |
StopNavigation = 0; |
603,11 → 619,15 |
if(CheckDelay(TimerSecond)) // one second Timer |
{ |
TimerSecond += 1000; |
if(FC.StatusFlags & FC_STATUS_FLY) |
{ |
NaviData.FlyingTime++; // we want to count the battery-time |
TimeSinceMotorStart++; |
} |
if((Parameter.ExtraConfig & CFG_FLYZONE_REQUIRED) && FlyzonePointCnt < 3 && FC_is_Calibrated) ShowNoFlyzoneErrorMessage++; else ShowNoFlyzoneErrorMessage = 0; |
// ++++++++++++++++++++++++++++++++++++++++++++++++ |
// + FC 3.0 Temperature |
// ++++++++++++++++++++++++++++++++++++++++++++++++ |
/trunk/main.h |
---|
13,7 → 13,7 |
//----------------------- |
#define VERSION_MAJOR 2 |
#define VERSION_MINOR 16 |
#define VERSION_MINOR 17 |
#define VERSION_PATCH 0 |
// 0 = A |
// 1 = B |
37,7 → 37,7 |
#define CAN_SLAVE_COMPATIBLE 2 |
#ifndef FOLLOW_ME |
#define FC_SPI_COMPATIBLE 84 // <------------------ |
#define FC_SPI_COMPATIBLE 85 // <------------------ |
#else |
#define FC_SPI_COMPATIBLE 0xFF |
#endif |
167,6 → 167,7 |
#define NC_TO_FC_FAILSAFE_LANDING 0x08 // activates Servos |
#define NC_TO_FC_SIMULATION_ACTIVE 0x10 // don't start motors if simulation ist active |
#define NC_TO_FC_SWITCHOFF_IF_LANDED 0x20 // switch off if MK is on the ground and doesn't further sink |
#define NC_TO_FC_OUTSIDE_FLYZONE 0x40 // for the Beep-Signal |
//Parameter.GlobalConfig3 |
#define CFG3_NO_SDCARD_NO_START 0x01 |
178,7 → 179,7 |
#define CFG3_SPEAK_ALL 0x40 |
#define CFG3_SERVO_NICK_COMP_OFF 0x80 |
// Parameter.GlobalConfig |
// Parameter.GlobalConfig |
#define FC_CFG_HOEHENREGELUNG 0x01 |
#define FC_CFG_HOEHEN_SCHALTER 0x02 |
#define FC_CFG_HEADING_HOLD 0x04 |
185,13 → 186,13 |
#define FC_CFG_KOMPASS_AKTIV 0x08 |
#define FC_CFG_KOMPASS_FIX 0x10 |
#define FC_CFG_GPS_AKTIV 0x20 |
#define FC_CFG_ACHSENKOPPLUNG_AKTIV 0x40 |
#define CFG_LAND_OUTSIDE_FLYZONE 0x40 |
#define FC_CFG_DREHRATEN_BEGRENZER 0x80 |
//Parameter.ExtraConfig |
#define CFG2_HEIGHT_LIMIT 0x01 |
#define CFG2_VARIO_BEEP 0x02 |
#define CFG_SENSITIVE_RC 0x04 |
#define CFG_FLYZONE_REQUIRED 0x04 |
#define CFG_3_3V_REFERENCE 0x08 |
#define CFG_NO_RCOFF_BEEPING 0x10 |
#define CFG_GPS_AID 0x20 |
368,6 → 369,7 |
extern u16 ToFC_Parachute_Off; // forced Switch off via IO1 |
extern u8 IO1_Function; |
extern u8 BaroCalState; |
extern u8 ErrorOutSideOperationArea; // I am outside the operation polygon area |
#define OEM_NAME_LENGHT 16 |
extern u8 OEM_String[OEM_NAME_LENGHT+1]; |