Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1924 → Rev 1925

/trunk/eeprom.c
347,7 → 347,9
// read paramset from eeprom
eeprom_read_block((void *) &EE_Parameter, (void*)(EEPROM_ADR_PARAMSET + PARAMSET_STRUCT_LEN * (setnumber - 1)), PARAMSET_STRUCT_LEN);
LED_Init();
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
LIBFC_HoTT_Clear();
#endif
return 1;
}
 
380,7 → 382,9
// update active settings number
SetActiveParamSet(setnumber);
LED_Init();
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
LIBFC_HoTT_Clear();
#endif
return 1;
}
// wrong revision
/trunk/fc.c
367,7 → 367,9
if((NeutralAccY < 300) || (NeutralAccY > 750)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_ROLL; };
if((NeutralAccZ < 512) || (NeutralAccZ > 850)) { VersionInfo.HardwareError[0] |= FC_ERROR0_ACC_TOP; };
carefree_old = 70;
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
LIBFC_HoTT_Clear();
#endif
}
 
 
1801,13 → 1803,13
{
if(EE_Parameter.MotorSmooth == 0)
{
tmp_int = 2 * tmp_int - tmp_motorwert[i];
tmp_int = 2 * tmp_int - tmp_motorwert[i];
}
else // 1 means tmp_int = tmp_int;
if(EE_Parameter.MotorSmooth > 1)
{
// If >= 2 then allow >= 50% of the intended step down to rapidly reach the intended value.
tmp_int = tmp_int + ((tmp_motorwert[i] - tmp_int)/EE_Parameter.MotorSmooth);
tmp_int = tmp_int + ((tmp_motorwert[i] - tmp_int)/EE_Parameter.MotorSmooth);
}
}
LIMIT_MIN_MAX(tmp_int,(int) MIN_GAS * 4,(int) MAX_GAS * 4);
/trunk/hottmenu.c
4,6 → 4,8
#include "spi.h"
#include "capacity.h"
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
 
#define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);}
#define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);}
#define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);}
118,11 → 120,10
case SATFIX_3D:
HoTT_printfxy(16,4," 3D ");
break;
case SATFIX_2D:
case SATFIX_NONE:
//case SATFIX_2D:
//case SATFIX_NONE:
default:
HoTT_printfxy_INV(16,4,"NOFIX");
HoTT_printfxy_BLINK(16,4,"NOFIX");
break;
}
if(GPSInfo.Flags & FLAG_DIFFSOLN)
248,7 → 249,7
else page = 0;
}
 
#endif
 
 
 
/trunk/hottmenu.h
1,6 → 1,8
#ifndef _HOTTMENU_H
#define _HOTTMENU_H
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
 
extern unsigned char HottKeyboard,HoTT_RequestedSensor;
extern unsigned char HottUpdate(unsigned char key);
 
112,3 → 114,5
#define HOTT_ELECTRIC_AIR_PACKET_ID 0x8E
 
#endif
#endif
 
/trunk/libfc1284.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/libfc644.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/main.c
309,7 → 309,9
{
static unsigned char second;
timer += 20; // 20 ms interval
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
if(EE_Parameter.Receiver == RECEIVER_HOTT) HoTT_Menu();
#endif
if(MissingMotor)
{
VersionInfo.HardwareError[1] |= FC_ERROR1_BL_MISSING;
/trunk/menu.c
8,10 → 8,10
#include "main.h"
#include "eeprom.h"
 
char DisplayBuff[80] = "Hello World";
char DisplayBuff[80];
unsigned char DispPtr = 0;
 
unsigned char MaxMenue = 17;
unsigned char MaxMenue = 16;
unsigned char MenuePunkt = 0;
unsigned char RemoteKeys = 0;
 
34,6 → 34,7
 
void Menu(void)
{
char i;
if(RemoteKeys & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue;}
if(RemoteKeys & KEY2) { if(MenuePunkt == MaxMenue) MenuePunkt = 0; else MenuePunkt++;}
if((RemoteKeys & KEY1) && (RemoteKeys & KEY2)) MenuePunkt = 0;
81,10 → 82,7
LCD_printfxy(0,3,"Compass: %5i",KompassValue);
break;
case 3:
LCD_printfxy(0,0,"K1:%4i K2:%4i ",PPM_in[1],PPM_in[2]);
LCD_printfxy(0,1,"K3:%4i K4:%4i ",PPM_in[3],PPM_in[4]);
LCD_printfxy(0,2,"K5:%4i K6:%4i ",PPM_in[5],PPM_in[6]);
LCD_printfxy(0,3,"K7:%4i K8:%4i ",PPM_in[7],PPM_in[8]);
for(i=0;i<8;i+=2) LCD_printfxy(0,i/2,"K%i:%4i K%i:%4i ",i,PPM_in[1],i+1,PPM_in[2]);
break;
case 4:
LCD_printfxy(0,0,"Ni:%4i Ro:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_NICK]],PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]);
140,16 → 138,10
LCD_printfxy(0,3,"Soll: %5i",KompassSollWert);
break;
case 10:
LCD_printfxy(0,0,"Poti1: %3i",Poti[0]);
LCD_printfxy(0,1,"Poti2: %3i",Poti[1]);
LCD_printfxy(0,2,"Poti3: %3i",Poti[2]);
LCD_printfxy(0,3,"Poti4: %3i",Poti[3]);
for(i=0;i<4;i++) LCD_printfxy(0,i,"Poti%i: %3i",i+1,Poti[i]);
break;
case 11:
LCD_printfxy(0,0,"Poti5: %3i",Poti[4]);
LCD_printfxy(0,1,"Poti6: %3i",Poti[5]);
LCD_printfxy(0,2,"Poti7: %3i",Poti[6]);
LCD_printfxy(0,3,"Poti8: %3i",Poti[7]);
for(i=0;i<4;i++) LCD_printfxy(0,i,"Poti%i: %3i",i+5,Poti[i+4]);
break;
case 12:
LCD_printfxy(0,0,"Servo " );
157,25 → 149,24
LCD_printfxy(0,2,"Position: %3i",ServoNickValue/4);
LCD_printfxy(0,3,"Range:%3i-%3i",EE_Parameter.ServoNickMin,EE_Parameter.ServoNickMax);
break;
case 13:
/* case 13:
LCD_printfxy(0,0,"ExternControl " );
LCD_printfxy(0,1,"Ni:%4i Ro:%4i ",ExternControl.Nick,ExternControl.Roll);
LCD_printfxy(0,2,"Gs:%4i Gi:%4i ",ExternControl.Gas,ExternControl.Gier);
LCD_printfxy(0,3,"Hi:%4i Cf:%4i ",ExternControl.Hight,ExternControl.Config);
break;
case 14:
*/
case 13:
LCD_printfxy(0,0,"BL-Ctrl Errors " );
LCD_printfxy(0,1,"%3d %3d %3d %3d ",Motor[0].State & MOTOR_STATE_ERROR_MASK,Motor[1].State & MOTOR_STATE_ERROR_MASK,Motor[2].State & MOTOR_STATE_ERROR_MASK,Motor[3].State & MOTOR_STATE_ERROR_MASK);
LCD_printfxy(0,2,"%3d %3d %3d %3d ",Motor[4].State & MOTOR_STATE_ERROR_MASK,Motor[5].State & MOTOR_STATE_ERROR_MASK,Motor[6].State & MOTOR_STATE_ERROR_MASK,Motor[7].State & MOTOR_STATE_ERROR_MASK);
LCD_printfxy(0,3,"%3d %3d %3d %3d ",Motor[8].State & MOTOR_STATE_ERROR_MASK,Motor[9].State & MOTOR_STATE_ERROR_MASK,Motor[10].State & MOTOR_STATE_ERROR_MASK,Motor[11].State & MOTOR_STATE_ERROR_MASK);
for(i=1;i<4;i++)
LCD_printfxy(0,i,"%3d %3d %3d %3d ",Motor[i*4].State & MOTOR_STATE_ERROR_MASK,Motor[i*4+1].State & MOTOR_STATE_ERROR_MASK,Motor[i*4+2].State & MOTOR_STATE_ERROR_MASK,Motor[i*4+3].State & MOTOR_STATE_ERROR_MASK);
break;
case 15:
case 14:
LCD_printfxy(0,0,"BL Temperature" );
LCD_printfxy(0,1,"%3i %3i %3i %3i ",Motor[0].Temperature,Motor[1].Temperature,Motor[2].Temperature,Motor[3].Temperature);
LCD_printfxy(0,2,"%3i %3i %3i %3i ",Motor[4].Temperature,Motor[5].Temperature,Motor[6].Temperature,Motor[7].Temperature);
LCD_printfxy(0,3,"%3i %3i %3i %3i ",Motor[8].Temperature,Motor[9].Temperature,Motor[10].Temperature,Motor[11].Temperature);
for(i=1;i<4;i++)
LCD_printfxy(0,i,"%3d %3d %3d %3d ",Motor[i*4].Temperature,Motor[i*4+1].Temperature,Motor[i*4+2].Temperature,Motor[i*4+3].Temperature);
break;
case 16:
case 15:
LCD_printfxy(0,0,"BL-Ctrl found " );
LCD_printfxy(0,1," %c %c %c %c ",'-' + 4 * (Motor[0].State>>7),'-' + 5 * (Motor[1].State>>7),'-' + 6 * (Motor[2].State>>7),'-' + 7 * (Motor[3].State>>7));
LCD_printfxy(0,2," %c %c %c %c ",'-' + 8 * (Motor[4].State>>7),'-' + 9 * (Motor[5].State>>7),'-' + 10 * (Motor[6].State>>7),'-' + 11 * (Motor[7].State>>7));
184,7 → 175,7
if(Motor[10].State>>7) LCD_printfxy(8,3,"11");
if(Motor[11].State>>7) LCD_printfxy(12,3,"12");
break;
case 17:
case 16:
LCD_printfxy(0,0,"Flight-Time " );
LCD_printfxy(0,1,"Total:%5umin",FlugMinutenGesamt);
LCD_printfxy(0,2,"Act: %5umin",FlugMinuten);