Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 787 → Rev 788

/trunk/main.c
587,12 → 587,6
{
LuftdruckTemperaturOffset = (31 * (s32)LuftdruckTemperaturOffset + ((FC_Temperatur_raw - FC_StartTemperature*10) * LuftdruckTemperaturKompensation) / 100) / 32;
}
/*
DebugOut.Analog[] = FC_Temperatur_raw/10;
DebugOut.Analog[] = FC_Temperatur;
DebugOut.Analog[] = NaviData.Altimeter_5cm * 5;
DebugOut.Analog[] = LuftdruckTemperaturOffset;
*/
// ++++++++++++++++++++++++++++++++++++++++++++++++
// + one second timer
// ++++++++++++++++++++++++++++++++++++++++++++++++
/trunk/main.h
14,7 → 14,7
 
#define VERSION_MAJOR 2
#define VERSION_MINOR 15
#define VERSION_PATCH 6
#define VERSION_PATCH 8
// 0 = A
// 1 = B
// 2 = C
73,9 → 73,41
#define FC_STATUS3_NOT_CALIBRATED 0x10
#define FC_STATUS3_MOTORS_STOPPED_BY_RC 0x20
 
 
// xxx.OSDStatusFlags (multiple data sets) -> this is the definition in the OSD data structure
#define OSD_FLAG_CAREFREE 0x01
#define OSD_FLAG_ALTITUDE_CONTROL 0x02
#define OSD_FLAG_CALIBRATE 0x04
#define OSD_FLAG_OUT1_ACTIVE 0x08
#define OSD_FLAG_OUT2_ACTIVE 0x10
#define OSD_FLAG_LOWBAT 0x20
#define OSD_FLAG_VARIO_TRIM_UP 0x40
#define OSD_FLAG_VARIO_TRIM_DOWN 0x80
 
// NaviData_Flags.OSDStatusFlags2 (Index:11) -> this is the definition in the OSD data structure
#define OSD2_FLAG_MOTOR_RUN 0x01
#define OSD2_FLAG_FLY 0x02
#define OSD2_FLAG_RC_FAILSAVE_ACTIVE 0x04
#define OSD2_FLAG_START 0x08
#define OSD2_FLAG_EMERGENCY_LANDING 0x10
#define OSD2_FLAG_WAIT_FOR_TAKEOFF 0x20 // Motor Running, but still on the ground
#define OSD2_FLAG_AUTO_STARTING 0x40
#define OSD2_FLAG_AUTO_LANDING 0x80
 
 
// the OSD-Flags are built from the FC status flags. They are combined into new bytes to increse the efficiency in the data protocol
#define OSD_FLAG_MASK1 (0x04 + 0x20 + 0x40 + 0x80)
#define OSD_FLAG_MASK2 (0x01 + 0x02 + 0x08 + 0x10)
 
// NC calculates
//OSDStatusFlags = (FC.StatusFlags & OSD_FLAG_MASK1) | (FC.StatusFlags2 & OSD_FLAG_MASK2);
//OSDStatusFlags2 = (FC.StatusFlags & ~OSD_FLAG_MASK1) | (FC.StatusFlags2 & ~OSD_FLAG_MASK2);
 
//calculate Back:
//FC.StatusFlags = (OSDStatusFlags & OSD_FLAG_MASK1) | (OSDStatusFlags2 & ~OSD_FLAG_MASK1);
//FC.StatusFlags2 = (OSDStatusFlags & OSD_FLAG_MASK2) | (OSDStatusFlags2 & ~OSD_FLAG_MASK2);
 
 
// .NCFlags
#define NC_FLAG_FREE 0x01
#define NC_FLAG_PH 0x02