Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2726 → Rev 2727

/trunk/fc.c
872,6 → 872,7
else Parameter_HoehenSchalter = 0;
}
}
 
if(!(Parameter_GlobalConfig & CFG_GPS_AKTIV)) Parameter_GPS_Switch = 0;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(EE_Parameter.CareFreeChannel || (ExternalControl.Config & EC_USE_SWITCH))
/trunk/fc.h
10,7 → 10,8
#define STICK_GAIN 4
#define ACC_AMPLIFY 6
#define HEIGHT_CONTROL_STICKTHRESHOLD 15
#define SERVO_FS_TIME 10 // in Seconds
#define SERVO_FS_TIME 10 // in Seconds
#define EXTRN_CTRL_TIMEOUT 15 // in Seconds
 
// FC_StatusFlags
#define FC_STATUS_MOTOR_RUN 0x01
/trunk/libfc1284.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/main.c
66,6 → 66,7
unsigned char Delete_Stoppflag_Timer = 0;
unsigned char OEM_String[17] = "Booting... \0\0\0\0\0";
unsigned char TouchDownTimer = 0;
unsigned char TimerSpeakReady = 0;
 
void PrintLine(void)
{
151,7 → 152,7
{
ToNC_Load_SingePoint = 1;
switch_hyterese = 2;
SpeakHoTT = SPEAK_NEXT_WP;
SpeakHoTT = SPEAK_STARTING_WP;
Show_Load_Time = 5;
Show_Load_Value = 1;
wp_tmp_l = 1;
173,7 → 174,7
ToNC_Load_SingePoint = wp_tmp_l;
Show_Load_Time = 5;
Show_Load_Value = wp_tmp_l;
SpeakHoTT = SPEAK_NEXT_WP;
// SpeakHoTT = SPEAK_NEXT_WP;
}
hyterese = 0;
}
186,7 → 187,7
{
ToNC_Store_SingePoint = 1;
switch_hyterese = 3;
SpeakHoTT = SPEAK_MIKROKOPTER;
// SpeakHoTT = SPEAK_MIKROKOPTER;
Show_Store_Time = 5;
Show_Store_Value = 1;
wp_tmp_s = 1;
208,7 → 209,7
ToNC_Store_SingePoint = wp_tmp_s;
Show_Store_Time = 5;
Show_Store_Value = wp_tmp_s;
SpeakHoTT = SPEAK_MIKROKOPTER;
// SpeakHoTT = SPEAK_MIKROKOPTER;
}
hyterese = 0;
}
582,7 → 583,7
if((NC_CompassSetpoint != -1) && !NeueKompassRichtungMerken)
{
int diff;
if((KompassSollWert != NC_CompassSetpoint) && (CareFree || NCForcesNewDirection))
if((KompassSollWert != NC_CompassSetpoint) && (CareFree || NCForcesNewDirection || (NC_GPS_ModeCharacter == 'W' /*&& !EE_Parameter.CareFreeChannel*/))) // seit 2.19 auch wenn Carefree channel nicht belegt
{
diff = ((540 + (KompassSollWert - NC_CompassSetpoint)) % 360) - 180;
if(diff > 2) diff = 2; // max. 2° in 20ms = 100°/sec
681,16 → 682,6
BeepMuster = 0x0300;
}
}
// +++++++++++++++++++++++++++++++++
if(ExternalControlTimeout)
{
ExternalControlTimeout--;
if(ExternalControlTimeout == 1)
{
ExternalControl.Config = 0;
beeptime = 2000;
}
}
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
// +++++++++++++++++++++++++++++++++++++++++++
// + Load/Store one single point
719,6 → 710,49
second = 0;
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
if(TimerSpeakReady)
{
if(!SpeakHoTT && !VersionInfo.HardwareError[0] && CalibrationDone && !NC_ErrorCode && !Partner_ErrorCode)
{
if((abs(MesswertGier) > 32 || abs(MesswertNick) > 20) || abs(MesswertRoll) > 20) TimerSpeakReady = 5;
if(--TimerSpeakReady == 0) if(!MotorenEin) SpeakHoTT = SPEAK_MK_READY;
}
}
if(EE_Parameter.Receiver != RECEIVER_HOTT) BuildHottStatusText();
 
#ifdef REDUNDANT_FC_MASTER
if(!SpeakHoTT)
{
static unsigned char speak_R_on = 3, speak_R_off = 0;
if(FC_StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE)
{
if(speak_R_on) if(--speak_R_on == 0)
{
SpeakHoTT = SPEAK_REDUNDANC_ON;
speak_R_on = 0;
}
speak_R_off = 5;
}
else
{
if(FC_StatusFlags & FC_STATUS_FLY)
{
if(--speak_R_off == 0)
{
SpeakHoTT = SPEAK_REDUNDANC_OFF;
speak_R_off = 60;
speak_R_on = 3;
}
}
else
{
speak_R_off = 3;
speak_R_on = 3;
}
}
}
#endif
 
if(ShowSettingNameTime) ShowSettingNameTime--;
if(Show_Load_Time) Show_Load_Time--;
if(Show_Store_Time) Show_Store_Time--;
735,6 → 769,31
}
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + for External control
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(ExternalControlTimeout)
{
ExternalControlTimeout--;
if(ExternalControlTimeout == EXTRN_CTRL_TIMEOUT - 3) // take sticks into middle Position after 3 seconds
{
ExternalControl.Nick = 0;
ExternalControl.Roll = 0;
ExternalControl.Gier = 0;
ExternalControl.Gas = 0;
// switch on GPS and Altitude Control
//if(!(ExternalControl.Switches & (EC2_PH | EC2_CH)))
ExternalControl.Switches |= EC2_PH;
ExternalControl.Switches |= EC2_ALTITUDE;
beeptime = 2000;
}
else
if(ExternalControlTimeout == 1)
{
ExternalControl.Config = 0;
beeptime = 2000;
}
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + for auto switch - off
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(--threeseconds == 0)
/trunk/main.h
3,7 → 3,7
 
//#define REDUNDANT_FC_SLAVE
//#define REDUNDANT_FC_MASTER
//#define NO_RECEIVER
//#define NO_RECEIVER // to operate without a receiver -> only for simulation
 
//#define DEBUG // use to activate debug output to MK-Tool: use Debug(text);
//#define ACT_S3D_SUMMENSIGNAL
54,6 → 54,7
extern void InitSerialPoti(void);
extern unsigned char TouchDownTimer;
unsigned char OEM_String[17];
extern unsigned char TimerSpeakReady;
 
#define NOTHING 0
#define MASTER 1
/trunk/spi.c
495,7 → 495,7
}
POI_KameraNick = (POI_KameraNick + FromNaviCtrl.Param.sInt[5]) / 2; // FromNaviCtrl.Param.sInt[5]; // Nickwinkel
//++++++++++++++++++++++++++++++++++++++++++++
if(FromNaviCtrl.Param.Byte[12] && !beeptime && !DisableRcOffBeeping) beeptime = FromNaviCtrl.Param.Byte[12] * 16;
if(FromNaviCtrl.Param.Byte[12] && !beeptime/* && !DisableRcOffBeeping*/) beeptime = FromNaviCtrl.Param.Byte[12] * 16;
//++++++++++++++++++++++++++++++++++++++++++++
if(FromNaviCtrl.Param.Byte[4] & KM_BIT_YAW) NCForcesNewDirection = 1;
NCParachute = FromNaviCtrl.Param.Byte[4] & (KM_BIT_SLOW | KM_BIT_OFF);
/trunk/uart.c
655,7 → 655,7
memcpy((unsigned char *)&ExternalControl, (unsigned char *)pRxData, sizeof(ExternalControl));
ConfirmFrame = ExternalControl.Frame;
if(Parameter_ExternalControl < 128 || (!ExternalControl.Config & EC_VALID)) ExternalControl.Config = 0;
else ExternalControlTimeout = 100; // 2 seconds timeout
else ExternalControlTimeout = EXTRN_CTRL_TIMEOUT;
}
break;
case 'c': // Poll the 3D-Data
/trunk/version.txt
893,7 → 893,22
 
2.19a (25.04.2017)
- variable baudrate
 
2.19b (26.06.2017)
- Automatic yaw in waypoint flight if CF-Switch is not assigned
- Speak "MK_READY" if the MK is ready and not moving
- New HoTT-Spoken words - Needs Transmitter Firmware Update
2.19c
- BL-Gimbal
- External Control: EC_ONLY_IF_MOTOR_OFF 0x10 // use these Stick Positions only if the motors are not running -> this is used for calibrate etc. to make sure that full throttle not applied with running motors
- if the AltitudeHold is used via ExternalControl -> switch on AltitudeHold in the parameters -> ExternalControl.Switches & EC2_ALTITUDE
- SPI -> Some Data moved to new Positions
- SPI -> Block to FC now 2 bytes longer and unused FCStatus removed
- Send HoTT_Statustext to NC
- NC also beeps if the transmitter was not switched on
 
toDo:
- CalAthmospheare nachführen