Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 923 → Rev 924

/trunk/main.c
163,7 → 163,7
void PrintControllerVersion(void)
{
u8 msg[40];
if(ControllerID == 0x91) sprintf(msg," NC Controller:STR911FAM44\r\n");
if(ControllerID == 0x91) ;// sprintf(msg," NC Controller:STR911FAM44\r\n");
else
if(ControllerID == 0x92) sprintf(msg," NC Controller:STR911FAM46\r\n");
else sprintf(msg,"\r\n Controller:??? 0x%02x !! \r\n\r\n",ControllerID);
/trunk/main.h
20,7 → 20,7
 
#define VERSION_MAJOR 2
#define VERSION_MINOR 21
#define VERSION_PATCH 7
#define VERSION_PATCH 8
// 0 = A
// 1 = B
// 2 = C
43,7 → 43,7
 
#define CAN_SLAVE_COMPATIBLE 2
#ifndef FOLLOW_ME
#define FC_SPI_COMPATIBLE 94 // <------------------
#define FC_SPI_COMPATIBLE 95 // <------------------
#else
#define FC_SPI_COMPATIBLE 0xFF
#endif
/trunk/spi_slave.c
977,9 → 977,9
// else CompassCalState = 0;
}
HoverGas = FromFlightCtrl.Param.Byte[1];
NaviData.Variometer = (NaviData.Variometer + 2 * (FromFlightCtrl.Param.sInt[1] - BaroAltimeter_dm)); // provisorisch
if(!(SimulationFlags & SIMULATION_ACTIVE)) NaviData.Variometer = (NaviData.Variometer + 4 * (FromFlightCtrl.Param.sInt[1] - FC.Altimeter_dm)) / 2;
FC.Altimeter_dm = FromFlightCtrl.Param.sInt[1]; // in 10cm
if(!(SimulationFlags & SIMULATION_ACTIVE)) NaviData.SetpointAltitude = FromFlightCtrl.Param.sInt[2]; // in 5cm
if(!(SimulationFlags & SIMULATION_ACTIVE)) NaviData.SetpointAltitude_5cm = FromFlightCtrl.Param.sInt[2]; // in 5cm
FC.Error[0] |= FromFlightCtrl.Param.Byte[6];
FC.Error[1] |= FromFlightCtrl.Param.Byte[7];
DebugOut.StatusGreen |= AMPEL_FC; // status of FC Present
/trunk/uart1.c
1339,7 → 1339,7
NaviData_Volatile.Heading = NaviData.Heading / 2;
NaviData_Volatile.CompassHeading = NaviData.CompassHeading / 2;
NaviData_Volatile.Gas = NaviData.Gas;
NaviData_Volatile.SetpointAltitude = NaviData.SetpointAltitude;
NaviData_Volatile.SetpointAltitude = NaviData.SetpointAltitude_5cm;
sent += MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'O', NC_ADDRESS, 1 , (u8 *)&NaviData_Volatile, sizeof(NaviData_Volatile)) + 1;
break;
case 13:
/trunk/uart1.h
180,7 → 180,7
s16 TopSpeed; // velocity in vertical direction in cm/s
u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached
u8 FCStatusFlags2; // StatusFlags2 (since version 5 added)
s16 SetpointAltitude; // setpoint for altitude
s16 SetpointAltitude_5cm; // setpoint for altitude
u8 Gas; // current gas (thrust)
u16 Current; // actual current in 0.1A steps
u16 UsedCapacity; // used capacity in mAh
/trunk/waypoints.c
955,7 → 955,7
if(FC.StatusFlags & FC_STATUS_FLY && ((FromFC_VarioCharacter != ' ') || (SimulationFlags & SIMULATION_ACTIVE))) // only in flight and if the Altitude control is enabled
{
WP.AltitudeRate = 255; // Auto
WP.Position.Altitude = NaviData.SetpointAltitude / 2;
WP.Position.Altitude = NaviData.SetpointAltitude_5cm / 2; // in dm
}
else
{
986,6 → 986,7
 
return(retval);
}
 
// load target gps posititon and heading from file
u8 PointList_LoadSinglePoint(WPL_Store_t * pWPL_Store)
{