/tags/V2.20h/Navi-Ctrl.Uv2 |
---|
90,6 → 90,7 |
File 2,5,<.\CamCtrl.h><CamCtrl.h> |
File 2,5,<.\libstr91x\include\91x_can.h><91x_can.h> |
File 2,5,<.\canbus.h><canbus.h> |
File 2,1,<.\MobileMenu.c><MobileMenu.c> |
File 3,2,<.\startup912.s><startup912.s> |
File 4,1,<.\libstr91x/src/91x_scu.c><91x_scu.c> |
File 4,1,<.\libstr91x/src/91x_gpio.c><91x_gpio.c> |
/tags/V2.20h/gpx.c |
---|
181,6 → 181,7 |
{ |
sprintf(string, "<name>%s</name>\r\n",tmp_license->User); CheckSumAndWrite(&Check16File,string, doc->file); |
sprintf(string, "<email>%s</email>\r\n",tmp_license->eMail); CheckSumAndWrite(&Check16File,string, doc->file); |
if(OEM_String[0] != 255) {sprintf(string, "<manufacturer>%s</manufacturer>\r\n",OEM_String); CheckSumAndWrite(&Check16File,string, doc->file);} |
else {sprintf(string, "<manufacturer>HiSystems GmbH</manufacturer>\r\n"); CheckSumAndWrite(&Check16File,string, doc->file);} |
sprintf(string, "<features>%s</features>\r\n",tmp_license->Feature); CheckSumAndWrite(&Check16File,string, doc->file); |
222,7 → 223,7 |
if((FC.StatusFlags3 & FC_STATUS3_BOAT)) {sprintf(string, "<BoatMode>On</BoatMode>\r\n");CheckSumAndWrite(&Check16File,string, doc->file);} |
if(Parameter.Driftkomp) {sprintf(string, "<DriftComp>%i</DriftComp>\r\n",Parameter.Driftkomp);CheckSumAndWrite(&Check16File,string, doc->file);}; |
sprintf(string, "<BaroKompens.>%i</BaroKompens.>\r\n",LuftdruckTemperaturKompensation);CheckSumAndWrite(&Check16File,string, doc->file); |
sprintf(string, "<FcTemperat.>%i.%1i</FcTemperat.>\r\n",FC_Temperatur/10,abs(FC_Temperatur)%10);CheckSumAndWrite(&Check16File,string, doc->file); |
if(UART_VersionInfo.HWMajor >= 30) { sprintf(string, "<FcTemperat.>%i.%1i</FcTemperat.>\r\n",FC_Temperatur/10,abs(FC_Temperatur)%10);CheckSumAndWrite(&Check16File,string, doc->file); } |
if(FromGimbalCtrl.GimbalStatus) {sprintf(string, "<GimbalCtrV>%i.%02i</GimbalCtrV>\r\n",1 + FromGimbalCtrl.Version / 100, FromGimbalCtrl.Version % 100);CheckSumAndWrite(&Check16File,string, doc->file);} |
if(EE_Parameter.ExternalControl) {sprintf(string, "<ExternalControl>%i,%02x,%02x</ExternalControl>\r\n",EE_Parameter.ExternalControl,FromFC_ExternalCtrlCfg,FromFC_ExternalCtrlSwitch);CheckSumAndWrite(&Check16File,string, doc->file);} |
sprintf(string, "<Channels>ALT:%i,GPS:%i,CF:%i,SL:%i,FS:%i,MSS:%i,SWP:%i,NWP:%i,CCM:%i,CCZ:%i</Channels>\r\n",EE_Parameter.HoeheChannel,EE_Parameter.NaviGpsModeChannel,EE_Parameter.CareFreeChannel, EE_Parameter.StartLandChannel, EE_Parameter.FailsafeChannel, EE_Parameter.MotorSafetySwitch,EE_Parameter.SingleWpControlChannel,EE_Parameter.MenuKeyChannel,EE_Parameter.CamCtrlModeChannel,EE_Parameter.CamCtrlZoomChannel);CheckSumAndWrite(&Check16File,string, doc->file); |
333,8 → 334,11 |
case GPX_DOC_OPENED: // close the file on the memorycard |
if(doc->file != NULL) |
{ |
sprintf(string, "<!-- FcTemperature:%d.%1d -->\r\n",FC_Temperatur/10,abs(FC_Temperatur)%10); |
CheckSumAndWrite(&Check16Block,string, doc->file); |
if(UART_VersionInfo.HWMajor >= 30) |
{ |
sprintf(string, "<!-- FcTemperature:%d.%1d -->\r\n",FC_Temperatur/10,abs(FC_Temperatur)%10); |
CheckSumAndWrite(&Check16Block,string, doc->file); |
} |
if(RedundanceWasActive) |
{ |
754,7 → 758,7 |
if(EE_Parameter.ExternalControl) |
{ |
sprintf(string, "<ExCtl>%02x,%02x,%i,%i,%i,%i</ExCtl>\r\n",FromFC_ExternalCtrlCfg,FromFC_ExternalCtrlSwitch,ExternControl.Nick, ExternControl.Roll,ExternControl.Gier,ExternControl.Gas); |
CheckSumAndWrite(&Check16File,string, doc->file); |
CheckSumAndWrite(&Check16Block,string, doc->file); |
} |
// RC Quality |
sprintf(string, "<RCQuality>%d</RCQuality>\r\n", FC.RC_Quality); |
797,10 → 801,10 |
if(NMEA_cnt_gga) |
{ |
sprintf(string, "<Ext_GNSS_Fix>%s</Ext_GNSS_Fix>\r\n",NMEA_In_Fix_Txt); |
CheckSumAndWrite(&Check16File,string, doc->file); |
sprintf(string, "<Ext_GNSS_Fix>%s,%u</Ext_GNSS_Fix>\r\n",NMEA_In_Fix_Txt,ExternalGpsInUse); |
CheckSumAndWrite(&Check16Block,string, doc->file); |
sprintf(string, "<Ext_GNSS_Alti>%s</Ext_GNSS_Alti>\r\n",NMEA_In_Alt_Txt); |
CheckSumAndWrite(&Check16File,string, doc->file); |
CheckSumAndWrite(&Check16Block,string, doc->file); |
} |
// eof extensions |
sprintf(string, "</extensions>\r\n"); |
/tags/V2.20h/main.c |
---|
125,6 → 125,8 |
u8 ShowCalibrationErrorMessage = 0; |
u8 TryAgain_UBX_Setup = 0; |
u8 MenuBlinkBit; |
u8 ExternalGpsInUse = 0; |
//---------------------------------------------------------------------------------------------------- |
void SCU_Config(void) |
{ |
/tags/V2.20h/main.h |
---|
18,7 → 18,7 |
#define VERSION_MAJOR 2 |
#define VERSION_MINOR 21 |
#define VERSION_PATCH 2 |
#define VERSION_PATCH 4 |
// 0 = A |
// 1 = B |
// 2 = C |
41,7 → 41,7 |
#define CAN_SLAVE_COMPATIBLE 2 |
#ifndef FOLLOW_ME |
#define FC_SPI_COMPATIBLE 93 // <------------------ |
#define FC_SPI_COMPATIBLE 94 // <------------------ |
#else |
#define FC_SPI_COMPATIBLE 0xFF |
#endif |
187,6 → 187,16 |
#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.BitConfig |
#define CFG_LOOP_OBEN 0x01 |
#define CFG_LOOP_UNTEN 0x02 |
#define CFG_LOOP_LINKS 0x04 |
#define CFG_LOOP_RECHTS 0x08 |
#define CFG_LED1_MOTOR_RUN 0x10 // LED Only active if MotorRun |
#define CFG_MOTOR_OFF_LED1 0x20 // Idle State if !MotorRun |
#define CFG_MOTOR_OFF_LED2 0x40 // Idle State if !MotorRun |
#define CFG_LED2_MOTOR_RUN 0x80 // LED Only active if MotorRun |
//Parameter.GlobalConfig3 |
#define CFG3_NO_SDCARD_NO_START 0x01 |
#define CFG3_RISE_FIRST_WAYPOINT 0x02 |
394,6 → 404,7 |
extern u8 OEM_String[OEM_NAME_LENGHT+1]; |
extern u8 TryAgain_UBX_Setup; |
extern u8 MenuBlinkBit; |
extern u8 ExternalGpsInUse; |
#define CHECK_ONLY 0 |
#define GET_LICENSE 1 |
/tags/V2.20h/menu.c |
---|
185,7 → 185,13 |
} |
else // newdata or processed |
{ |
LCD_printfxy(0,0,"Sat:%02d ", GPSData.NumOfSats); |
LCD_printfxy(0,0,"Sat:%02d Fix:%c", GPSData.NumOfSats,NMEA_In_Fix_Txt[0]); |
if(ExternalGpsInUse) |
{ |
LCD_printfxy(7,0,"Fix:%c ",NMEA_In_Fix_Txt[0]); |
} |
else |
{ |
switch (GPSData.SatFix) |
{ |
case SATFIX_NONE: |
209,6 → 215,8 |
{ |
LCD_printfxy(12,0," "); |
} |
} |
if(GPSData.SatFix == SATFIX_NONE) LCD_printfxy(7,0,"NoFix "); |
if(GPSData.Position.Longitude < 0) sign = '-'; |
else sign = '+'; |
225,7 → 233,9 |
i1 = abs(GPSData.Position.Altitude)/1000L; |
i2 = abs(GPSData.Position.Altitude)%1000L; |
LCD_printfxy(0,3,"Alt:%c%04ld.%03ldm V%d", sign, i1, i2, GPS_Version/1000); |
if(ExternalGpsInUse) LCD_printfxy(15,3,"NMEA"); |
} |
break; |
case 3: |
if (GPSData.Status == INVALID) |
/tags/V2.20h/spi_slave.c |
---|
779,6 → 779,7 |
FromFlightCtrl_AccRoll = FromFlightCtrl.Param.sInt[7]; |
DebugOut.Analog[2] = FromFlightCtrl_AccNick; |
DebugOut.Analog[3] = FromFlightCtrl_AccRoll; |
DebugOut.Analog[16] = AmountOfMotors; |
// ++++++++++++++++++++++++++++++++++++++ |
//+ Voltage |
// ++++++++++++++++++++++++++++++++++++++ |
/tags/V2.20h/spi_slave.h |
---|
375,7 → 375,8 |
unsigned char GimbalYawChannel; |
unsigned char GimbalOut1Channel; |
unsigned char GimbalOut2Channel; |
unsigned char reserved[28]; // for later use |
unsigned char ExternalGpsChannel; |
unsigned char reserved[27]; // for later use |
//------------------------------------------------ |
unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen |
/tags/V2.20h/uart2.c |
---|
437,7 → 437,7 |
if(data == ',') |
{ |
if(++state != 219) // letztes Leerzeiten entfernen |
fix_txt[i++] = ' '; // komma durch leerzeichen ersetzten |
fix_txt[i++] = ','; // komma durch leerzeichen ersetzten |
} |
else if(i < 9) fix_txt[i++] = data; |
fix_txt[i] = 0; |
/tags/V2.20h/ubx.c |
---|
63,6 → 63,7 |
#include "led.h" |
#include "timer1.h" |
#include "GPS.h" |
#include "spi_slave.h" |
// ------------------------------------------------------------------------------------------------ |
// defines |
326,7 → 327,8 |
GPSData.Position.Status = INVALID; |
if(!(SimulationFlags & SIMULATION_ACTIVE)) |
{ |
if((Parameter.User3 > 100) && (NMEA_Position.Status != INVALID)) |
if((NMEA_Position.Status != INVALID) && (PPM_In[EE_Parameter.ExternalGpsChannel] > 50)) |
{ |
GPSData.Position.Longitude = NMEA_Position.Longitude; |
GPSData.Position.Latitude = NMEA_Position.Latitude; |
336,6 → 338,7 |
else |
if(CheckAscii(NMEA_In_Fix_Txt[2])) GPSData.NumOfSats = AsciiToNum(NMEA_In_Fix_Txt[2]); // nur eine Ziffer? (weiss nicht, ob das vorkommt..) |
else GPSData.NumOfSats = 0; |
ExternalGpsInUse = 1; |
} |
else |
{ |
343,6 → 346,7 |
GPSData.Position.Longitude = UbxPosLlh.LON; // in steps of 1E-7 deg |
GPSData.Position.Latitude = UbxPosLlh.LAT; // in steps of 1E-7 deg |
GPSData.Position.Altitude = UbxPosLlh.HMSL; // in steps of 1 mm |
ExternalGpsInUse = 0; |
} |
} |
else // simulation active |