/trunk/main.c |
---|
474,7 → 474,7 |
if(StopNavigation && (Parameter.NaviGpsModeControl >= 50) && (Parameter.GlobalConfig & FC_CFG_GPS_AKTIV)) BeepTime = 1000; |
} |
running = 0; |
if(!PollingTimeout) DebugOut.Analog[17]++; |
// if(!PollingTimeout) DebugOut.Analog[17]++; |
return(0); |
} |
/trunk/main.h |
---|
14,7 → 14,7 |
#define VERSION_MAJOR 2 |
#define VERSION_MINOR 5 |
#define VERSION_PATCH 1 |
#define VERSION_PATCH 2 |
// 0 = A |
// 1 = B |
// 2 = C |
213,4 → 213,9 |
extern volatile u32 PollingTimeout; |
extern u32 CountGpsProcessedIn5Sec,CountNewGpsDataIn5Sec, FreqGpsProcessedIn5Sec, FreqNewGpsDataIn5Sec; |
extern u16 SD_SettingWaitLED; |
extern u16 SD_PosAccuracy; |
extern u16 SD_ComingHomeSpeed; |
extern u16 SD_DPH_Speed; |
#endif // _MAIN_H |
/trunk/menu.c |
---|
74,7 → 74,7 |
u8 MenuItem = 0; |
u8 MaxMenuItem = 25; |
u8 MaxMenuItem = 27; |
void Menu_Putchar(char c) |
{ |
504,19 → 504,60 |
case 25: |
{ |
static u8 index = 1; |
if(Keys & KEY3) // next step |
if(Keys & KEY3) |
{ |
if(index < ToFC_MaxWpListIndex) index++; |
else index = 1; |
} |
if(Keys & KEY4) FromFC_LoadWP_List = index | 0x80; |
LCD_printfxy(0,0,"Load WPL (Relativ)" ); |
LCD_printfxy(0,0,"Load WPL (Rel)" ); |
LCD_printfxy(0,1,"Name: %s", WPL_Store.Name); |
// 12345678901234567890 |
LCD_printfxy(0,2,"Points Index "); |
LCD_printfxy(0,3," %3d %3d LOAD", PointList_GetCount(), index); |
if(GPSData.SatFix == SATFIX_3D) |
{ |
LCD_printfxy(0,3," %3d %3d LOAD", PointList_GetCount(), index); |
if(Keys & KEY4) FromFC_LoadWP_List = index | 0x80; |
} |
else LCD_printfxy(0,3," No Satfix ! ", index); |
} |
break; |
case 26: |
{ |
static u8 index = 1; |
if(Keys & KEY3) |
{ |
if(index < ToFC_MaxWpListIndex) index++; |
else index = 1; |
} |
if(Keys & KEY4) FromFC_Load_SinglePoint = index; |
LCD_printfxy(0,0,"Load Point" ); |
LCD_printfxy(0,1,"Name: %s", WPL_Store.Name); |
// 12345678901234567890 |
// LCD_printfxy(0,2,"Points Index "); |
LCD_printfxy(0,3,"Number: %3d (LOAD)", index); |
} |
break; |
case 27: |
{ |
static u8 index = 1; |
if(Keys & KEY3) |
{ |
if(index < ToFC_MaxWpListIndex) index++; |
else index = 1; |
} |
LCD_printfxy(0,0,"Save Point" ); |
LCD_printfxy(0,1,"Alt: %3dm", NaviData.Altimeter/20); |
// 12345678901234567890 |
LCD_printfxy(0,2,"Dir: %3d ", CompassSetpointCorrected/10); |
if(GPSData.SatFix == SATFIX_3D) |
{ |
LCD_printfxy(0,3,"Number: %3d (SAVE)", index); |
if(Keys & KEY4) FromFC_Save_SinglePoint = index; |
} |
else LCD_printfxy(0,3," No Satfix ! ", index); |
} |
break; |
default: |
//MaxMenuItem = MenuItem - 1; |
/trunk/settings.c |
---|
95,6 → 95,7 |
{PID_SEND_NMEA , "NMEA_INTERVAL \0" ,"NMEA Output interval in ms (0 = disabled) ", 1, 0, 0, 0, 60000}, // the log interval for NMEA output, 0 = off |
{PID_CH_SPEED , "COMINGHOME_SPEED\0" ,"Maximum speed for coming home in 0,1m/sec (80 = 8,0 m/sec) ", 1, 80, 80, 10, 150}, |
{PID_DPH_SPEED , "DYNAMIC_PH_SPEED\0" ,"Maximum speed for dynamic position hold in 0,1m/sec ", 1, 100, 100, 20, 150}, |
{PID_POSITION_ACCURACY , "POS.ACCURACY \0" ,"Desired Accuracy of position in percent ", 1, 100, 100, 0, 255}, |
{PID_GPS_AUTOCONFIG , "GPSAUTOCONFIG \0" ,"GPS configmode (0 = off, 1 = on) ", 1, 1, 1, 0, 1} |
}; |
/trunk/settings.h |
---|
17,6 → 17,7 |
PID_WP_ACCELERATE, |
PID_SEND_NMEA, |
PID_CH_SPEED, |
PID_POSITION_ACCURACY, |
PID_DPH_SPEED |
} ParamId_t; |
/trunk/spi_slave.c |
---|
111,7 → 111,7 |
u32 ToFC_AltitudeRate = 0; |
s32 ToFC_AltitudeSetpoint = 0; |
u8 FromFC_VarioCharacter = ' '; |
u8 GPS_Aid_StickMultiplikator = 0; |
s16 GPS_Aid_StickMultiplikator = 0; |
u8 NC_GPS_ModeCharacter = ' '; |
u8 FCCalibActive = 0; |
u8 FC_is_Calibrated = 0; |
351,7 → 351,8 |
ToFlightCtrl.Param.Byte[7] = GPS_Aid_StickMultiplikator; |
if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH) |
{ |
ToFlightCtrl.Param.sInt[4] = CAM_Orientation.Azimuth; |
if(CAM_Orientation.Azimuth != -1) ToFlightCtrl.Param.sInt[4] = (CAM_Orientation.Azimuth + 720 - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10)) % 360; // the FC uses the uncorrected comnpass value |
else CAM_Orientation.Azimuth = -1; |
CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH; |
} |
else |
/trunk/spi_slave.h |
---|
184,7 → 184,7 |
extern ToFlightCtrl_t ToFlightCtrl; |
extern volatile u32 SPI0_Timeout; |
extern SPI_Version_t FC_Version; |
extern u8 GPS_Aid_StickMultiplikator; |
extern s16 GPS_Aid_StickMultiplikator; |
extern u8 CompassCalState; |
void SPI0_Init(void); |
/trunk/uart1.c |
---|
159,9 → 159,9 |
"SPI Okay ", |
"I2C Error ", |
"I2C Okay ", //15 |
"16 ", |
"17 ", |
"18 ", |
"16 dist (cm) ", |
"17 pos accuracy ", |
"18 YawCorrection", |
"19 ", // SD-Card-time |
"EarthMagnet [%] ", //20 |
"Ground Speed ", // "Z_Speed ", |
/trunk/ubx.c |
---|
353,6 → 353,12 |
//GPSData.Position.Longitude =-740446540L; // Liberty Staue direkt |
//GPSData.Position.Latitude = 406891590L; // Liberty Staue 1 |
//GPSData.Position.Longitude =-1142878694L; // Flori |
//GPSData.Position.Latitude = 483712102L; // |
//GPSData.Position.Longitude =1251674613L; // Bubble |
//GPSData.Position.Latitude = 466058365L; // |
} |
/trunk/waypoints.c |
---|
641,7 → 641,7 |
} |
else if(WPNumber > MAX_LIST_LEN) // number o points larger than ram list |
{ |
UART1_PutString("To much points!"); |
UART1_PutString("To many points!"); |
return(WPL_ERROR); |
} |
} |
746,7 → 746,12 |
u8 filename[30]; |
Point_t WP; |
if(GPSData.Position.Status != INVALID) return(retval); |
UART1_PutString("\n\r write single point\n\r"); |
if(GPSData.Position.Status == INVALID) |
{ |
UART1_PutString("ERROR: No GPS - Fix\n\r"); |
return(retval); |
} |
// clear current point list |
PointList_Clear(); |
755,22 → 760,35 |
// set heading |
WP.Heading = CompassSetpointCorrected/10; |
if(WP.Heading == 0) WP.Heading = 360; |
WP.ToleranceRadius = 0; |
WP.HoldTime = 0; |
WP.ToleranceRadius = 15; |
WP.HoldTime = 5; |
WP.Index = 1; |
WP.Type = POINT_TYPE_WP; |
WP.WP_EventChannelValue = 0; |
WP.AltitudeRate = 0; |
WP.Speed = 0; |
if(FC.StatusFlags & FC_STATUS_FLY && (NaviData.Altimeter) > 8 * 20) |
{ |
WP.AltitudeRate = 30; |
WP.Position.Altitude = NaviData.Altimeter / 2; |
} |
else |
{ |
WP.AltitudeRate = 0; |
WP.Position.Altitude = 0; |
} |
WP.Speed = SD_ComingHomeSpeed; |
WP.CamAngle = 0; |
WP.Name[0] = 'P'; |
WP.Name[1] = 0; |
// add this point to wp list |
PointList_SetAt(&WP); |
sprintf(filename, "/WPL/point_%03d.wpl", pWPL_Store->Index); |
sprintf(pWPL_Store->Name, "POINT%03d", pWPL_Store->Index); |
sprintf(filename, "/POINT/POINT%03d.wpl", pWPL_Store->Index); |
UART1_PutString(filename); |
sprintf(pWPL_Store->Name, "POINT%03d ", pWPL_Store->Index); |
retval = PointList_Save(filename, pWPL_Store->Name, 1); |
// clear current point list |
PointList_Clear(); |
return(retval); |
} |
// load target gps posititon and heading from file |
778,7 → 796,7 |
{ |
u8 filename[30]; |
sprintf(filename, "/WPL/point_%03d.wpl", pWPL_Store->Index); |
sprintf(filename, "/POINT/POINT%03d.wpl", pWPL_Store->Index); |
pWPL_Store->Name[0] = 0; // clear current list name |
return PointList_Load(filename, pWPL_Store->Name, sizeof(pWPL_Store->Name)); |
} |