Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 604 → Rev 605

/trunk/spi_slave.c
117,8 → 117,8
u8 NC_GPS_ModeCharacter = ' ';
u8 FCCalibActive = 0;
u8 FC_is_Calibrated = 0;
Motor_t Motor[12];
u8 Motor_Version[12]; // das kann nicht in die struct, weil der PC die Struktur bekommt
Motor_t Motor[MAX_MOTORS];
u8 Motor_Version[MAX_MOTORS]; // das kann nicht in die struct, weil der PC die Struktur bekommt
u8 NC_To_FC_Flags = 0;
u8 BL_MinOfMaxPWM = 255; // indication if all BL-controllers run on full power
u8 Logging_BL_MinOfMaxPWM = 255;
299,6 → 299,7
static u32 timeout = 0;
static u8 counter = 50,hott_index = 0, last_error_code = 0, enable_injecting = 0;
static s16 last_wp_event = 0;
u8 index;
s16 tmp;
s32 i1,i2;
/*
685,12 → 686,13
if(BL_MinOfMaxPWM < ErrorCheck_BL_MinOfMaxPWM) ErrorCheck_BL_MinOfMaxPWM = BL_MinOfMaxPWM; // hold the value until Error processed
Parameter.NaviGpsModeControl = FromFlightCtrl.Param.Byte[4];
FromFC_VarioCharacter = FromFlightCtrl.Param.Byte[5];
Motor[FromFlightCtrl.Param.Byte[2]].NotReadyCnt = FromFlightCtrl.Param.Byte[6];
Motor_Version[FromFlightCtrl.Param.Byte[2]] = FromFlightCtrl.Param.Byte[7];
Motor[FromFlightCtrl.Param.Byte[2]].MaxPWM = FromFlightCtrl.Param.Byte[8];
Motor[FromFlightCtrl.Param.Byte[2]].State = FromFlightCtrl.Param.Byte[9];
Motor[FromFlightCtrl.Param.Byte[2]].Temperature = FromFlightCtrl.Param.Byte[10];
Motor[FromFlightCtrl.Param.Byte[2]].Current = FromFlightCtrl.Param.Byte[11];
index = FromFlightCtrl.Param.Byte[2] % MAX_MOTORS;
Motor[index].NotReadyCnt = FromFlightCtrl.Param.Byte[6];
Motor_Version[index] = FromFlightCtrl.Param.Byte[7];
Motor[index].MaxPWM = FromFlightCtrl.Param.Byte[8];
Motor[index].State = FromFlightCtrl.Param.Byte[9];
Motor[index].Temperature = FromFlightCtrl.Param.Byte[10];
Motor[index].Current = FromFlightCtrl.Param.Byte[11];
if(FromFC_VarioCharacter == '+' || FromFC_VarioCharacter == '-') // manual setpoint clears the NC-Parameter command
{
NCParams_ClearValue(NCPARAMS_ALTITUDE_RATE);
714,7 → 716,7
CHK_POTI_MM(Parameter.NaviAngleLimitation,FromFlightCtrl.Param.Byte[11],0,255);
break;
case SPI_FCCMD_PARAMETER2:
CHK_POTI_MM(Parameter.AutoPhotoDistance,FromFlightCtrl.Param.Byte[0],0,255);
CHK_POTI_MM(FC.AutoPhotoDistance,FromFlightCtrl.Param.Byte[0],0,255);
if(FromFlightCtrl.Param.Byte[1]) FC.FromFC_SpeakHoTT = FromFlightCtrl.Param.Byte[1]; // will be cleared in the SD-Logging
FC.BAT_UsedCapacity = FromFlightCtrl.Param.Int[1]; // 2 & 3
Parameter.FromFC_LowVoltageHomeActive = FromFlightCtrl.Param.Byte[4];