Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2574 → Rev 2575

/trunk/fc.c
531,7 → 531,7
Mess_Integral_Gier += MesswertGier;
ErsatzKompass += MesswertGier;
// Kopplungsanteil +++++++++++++++++++++++++++++++++++++
if(!Looping_Nick && !Looping_Roll && (Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV))
if(!Looping_Nick && !Looping_Roll)// && (Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV))
{
tmpl3 = (MesswertRoll * winkel_nick) / 2048L;
tmpl3 *= Parameter_AchsKopplung2; //65
/trunk/hottmenu.c
58,7 → 58,7
 
unsigned char NaviData_WaypointIndex = 0;
unsigned char NaviData_WaypointNumber = 0, NaviData_TargetHoldTime = 0, ToNC_Load_WP_List = 0, NaviData_MaxWpListIndex = 0;
unsigned char ToNC_Load_SingePoint = 0, ToNC_Store_SingePoint = 0, Show_Load = 0, Show_Store = 0;
unsigned char ToNC_Load_SingePoint = 0, ToNC_Store_SingePoint = 0, Show_Load_Time = 0, Show_Load_Value = 0, Show_Store_Time = 0, Show_Store_Value = 0;
char WPL_Name[10];// = {" \0"};
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
453,14 → 453,26
}
}
else
if(Show_Store)
if(Show_Store_Time)
{
for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&STORE[i]); // no Error and not calibrated
if(Show_Store_Value < 10) VarioPacket.Text[18] = Show_Store_Value + '0';
else
{
VarioPacket.Text[18] = Show_Store_Value/10 + '0';
VarioPacket.Text[19] = Show_Store_Value%10 + '0';
}
}
else
if(Show_Load)
if(Show_Load_Time)
{
for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&LOAD[i]); // no Error and not calibrated
if(Show_Load_Value < 10) VarioPacket.Text[17] = Show_Load_Value + '0';
else
{
VarioPacket.Text[17] = Show_Load_Value/10 + '0';
VarioPacket.Text[18] = Show_Load_Value%10 + '0';
}
}
else
if(NaviData_WaypointNumber)
909,7 → 921,7
if(HoTTBlink)
{
LIBFC_HoTT_SetPos(6 * 21);
if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! ");
// if(!(Parameter_GlobalConfig & CFG_ACHSENKOPPLUNG_AKTIV)) HoTT_printf_BLINK("COUPLING OFF! ");
if(EE_Parameter.BitConfig & (CFG_LOOP_LINKS | CFG_LOOP_RECHTS | CFG_LOOP_UNTEN | CFG_LOOP_OBEN)) HoTT_printf_BLINK("LOOPING! ");
if(Parameter_GlobalConfig & CFG_HEADING_HOLD) HoTT_printf_BLINK("HH! ");
if(!(Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)) HoTT_printf_BLINK("COMPASS OFF! ");
1082,13 → 1094,13
HottKeyboard = 0;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Bedienung per Taster am Sender
if(PPM_in[EE_Parameter.MenuKeyChannel] > 120) //
if(PPM_in[EE_Parameter.MenuKeyChannel] > 50) //
{
hyterese = 2;
if(CheckDelay(delay)) { wp_tmp = 0; hyterese = 1;}
}
else
if(PPM_in[EE_Parameter.MenuKeyChannel] < 100)
if(PPM_in[EE_Parameter.MenuKeyChannel] < -50)
{
delay = SetDelay(2500);
if(hyterese == 2 && (wp_tmp < NaviData_MaxWpListIndex))
1163,13 → 1175,13
HottKeyboard = 0;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Bedienung per Taster am Sender
if(PPM_in[EE_Parameter.MenuKeyChannel] > 120) //
if(PPM_in[EE_Parameter.MenuKeyChannel] > 50) //
{
hyterese = 2;
if(CheckDelay(delay)) { wp_tmp = 0; hyterese = 1;}
}
else
if(PPM_in[EE_Parameter.MenuKeyChannel] < 100)
if(PPM_in[EE_Parameter.MenuKeyChannel] < -50)
{
delay = SetDelay(2500);
if(hyterese == 2 && (wp_tmp < NaviData_MaxWpListIndex))
/trunk/hottmenu.h
3,7 → 3,7
 
extern unsigned char NaviData_WaypointIndex;
extern unsigned char NaviData_WaypointNumber, NaviData_TargetHoldTime,ToNC_Load_WP_List,NaviData_MaxWpListIndex;
extern unsigned char ToNC_Load_SingePoint, ToNC_Store_SingePoint, Show_Load, Show_Store;
extern unsigned char ToNC_Load_SingePoint, ToNC_Store_SingePoint, Show_Load_Time, Show_Store_Time, Show_Load_Value, Show_Store_Value;
 
extern char WPL_Name[10];
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
/trunk/libfc1284.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/main.c
130,6 → 130,90
 
}
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
void LoadStoreSingleWP(void)
{
// +++++++++++++++++++++++++++++++++++++++++++
// + Load/Store one single point
// +++++++++++++++++++++++++++++++++++++++++++
static unsigned char switch_hyterese = 0, hyterese = 1, wp_tmp_s = 0, wp_tmp_l = 0;
static int delay;
 
if(PPM_in[EE_Parameter.SingleWpControlChannel] > 50) // Switch Up -> load
{
if(switch_hyterese == 1 || switch_hyterese == 3)
{
ToNC_Load_SingePoint = 1;
switch_hyterese = 2;
SpeakHoTT = SPEAK_NEXT_WP;
Show_Load_Time = 5;
Show_Load_Value = 1;
wp_tmp_l = 1;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Bedienung per Taster am Sender
if(PPM_in[EE_Parameter.MenuKeyChannel] > 50) //
{
hyterese = 2;
if(CheckDelay(delay)) { wp_tmp_l = 0; hyterese = 1;}
}
else
if(PPM_in[EE_Parameter.MenuKeyChannel] < -50)
{
delay = SetDelay(2500);
if(hyterese == 2 && (wp_tmp_l < NaviData_MaxWpListIndex))
{
wp_tmp_l++;
ToNC_Load_SingePoint = wp_tmp_l;
Show_Load_Time = 5;
Show_Load_Value = wp_tmp_l;
SpeakHoTT = SPEAK_NEXT_WP;
}
hyterese = 0;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
else
if(PPM_in[EE_Parameter.SingleWpControlChannel] < -50) // Switch Down -> store
{
if(switch_hyterese == 1 || switch_hyterese == 2)
{
ToNC_Store_SingePoint = 1;
switch_hyterese = 3;
SpeakHoTT = SPEAK_MIKROKOPTER;
Show_Store_Time = 5;
Show_Store_Value = 1;
wp_tmp_s = 1;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Bedienung per Taster am Sender
if(PPM_in[EE_Parameter.MenuKeyChannel] > 50) //
{
hyterese = 2;
if(CheckDelay(delay)) { wp_tmp_s = 0; hyterese = 1;}
}
else
if(PPM_in[EE_Parameter.MenuKeyChannel] < -50)
{
delay = SetDelay(2500);
if(hyterese == 2 && (wp_tmp_s < NaviData_MaxWpListIndex))
{
wp_tmp_s++;
ToNC_Store_SingePoint = wp_tmp_s;
Show_Store_Time = 5;
Show_Store_Value = wp_tmp_s;
SpeakHoTT = SPEAK_MIKROKOPTER;
}
hyterese = 0;
}
}
else // Middle
{
switch_hyterese = 1;
}
}
// +++++++++++++++++++++++++++++++++++++++++++
#endif
//############################################################################
//Hauptprogramm
int main (void)
136,7 → 220,7
//############################################################################
{
unsigned int timer,i,timer2 = 0, timerPolling;
unsigned char update_spi = 1, switch_hyterese = 0;
unsigned char update_spi = 1;
DDRB = 0x00;
PORTB = 0x00;
DDRD = 0x0A; // UART & J3 J4 J5
512,52 → 596,23
ExternalControlTimeout--;
if(ExternalControlTimeout == 1) beeptime = 2000;
}
// +++++++++++++++++++++++++++++++++
// Sekundentakt
if(++second == 49)
{
second = 0;
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
 
// +++++++++++++++++++++++++++++++++++++++++++
// + Load/Store one single point
// +++++++++++++++++++++++++++++++++++++++++++
if(EE_Parameter.SingleWpControlChannel)
{
if(PPM_in[EE_Parameter.SingleWpControlChannel] > 50) // Switch Up -> load
{
if(switch_hyterese == 1 || switch_hyterese == 3)
{
ToNC_Load_SingePoint = 1;
switch_hyterese = 2;
SpeakHoTT = SPEAK_NEXT_WP;
Show_Load = 5;
}
}
else
if(PPM_in[EE_Parameter.SingleWpControlChannel] < -50) // Switch Down -> store
{
if(switch_hyterese == 1 || switch_hyterese == 2)
{
ToNC_Store_SingePoint = 1;
switch_hyterese = 3;
SpeakHoTT = SPEAK_MIKROKOPTER;
Show_Store = 5;
}
}
else // Middle
{
switch_hyterese = 1;
}
}
if(EE_Parameter.SingleWpControlChannel) LoadStoreSingleWP();
// +++++++++++++++++++++++++++++++++++++++++++
 
#endif
// +++++++++++++++++++++++++++++++++
// Sekundentakt
if(++second == 49)
{
second = 0;
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
if(ShowSettingNameTime) ShowSettingNameTime--;
if(Show_Load) Show_Load--;
if(Show_Store) Show_Store--;
if(Show_Load_Time) Show_Load_Time--;
if(Show_Store_Time) Show_Store_Time--;
#endif
if(NC_To_FC_Flags & NC_TO_FC_FAILSAFE_LANDING) ServoFailsafeActive = SERVO_FS_TIME;
else
/trunk/version.txt
800,7 → 800,13
- SingleWpControlChannel -> 3-stage switch for store/call single point
- MenuKeyChannel -> Key for Jeti/HoTT-Menu: Sinple points
- REDUNDANT Slave doesn't report 'CareFree-Error'
 
2.11b (19.07.2015)
- Load Points via Switch on transmitter without using a menu
- AxisDecoupling can't be deactivated
 
toDo:
- CalAthmospheare nachführen