109,6 → 109,13 |
unsigned int AboTimeOut = 0; |
unsigned volatile char ReceiverUpdateModeActive = 0; // 1 = Update 2 = JetiBox-Simulation |
|
|
|
|
|
#ifdef WITH_FULL_ANALOG_TEXT /// MartinW main.h means no memsave |
#warning : "### with normal ANALOG_TEXT[32][16] ###" |
|
const unsigned char ANALOG_TEXT[32][16] PROGMEM = |
{ |
//1234567890123456 |
128,17 → 135,17 |
"Motor 2 ", |
"Motor 3 ", |
"Motor 4 ", //15 |
"16 ", |
"17 ", |
"18 ", |
"19 ", |
"Servo ", //20 |
"PAN-Cos ",//MartinR |
"PAN-Sin ",//MartinR |
"PAN-Servo ",//MartinR |
"Servo-Roll ",//MartinR |
"Servo-Nick ", //20 |
"Hovergas ", |
"Current [0.1A] ", |
"Capacity [mAh] ", |
"Height Setpoint ", |
"25 ", //25 |
"26 ", //"26 CPU OverLoad ", |
"Hight Setpoint ", |
"FC_StatusFlags ", //25 ///MartinR |
"FC_StatusFlags2 ",///MartinR |
"Compass Setpoint", |
"I2C-Error ", |
"BL Limit ", |
147,6 → 154,48 |
}; |
|
|
#else |
#warning : "### with reduced ANALOG_TEXT[32][13] ###" |
const unsigned char ANALOG_TEXT[32][13] PROGMEM = |
{ |
//1234567890123456 |
"AngleNick ", //0 |
"AngleRoll ", |
"AccNick ", |
"AccRoll ", |
"YawGyro ", |
"Height Value ", //5 |
"AccZ ", |
"Gas ", |
"Compass Value", |
"Voltage[0.1V]", |
"ReceiverLevel", //10 |
"Gyro Compass ", |
"Motor 1 ", |
"Motor 2 ", |
"Motor 3 ", |
"Motor 4 ", //15 |
"PAN-cos ",//MartinR |
"PAN-sin ",//MartinR |
"PAN-Servo ",//MartinR |
"Servo-Roll ",//MartinR |
"Servo-Nick ", //20 |
"Hovergas ", |
"Current[0.1A]", |
"Capacity[mAh]", |
"Hight Setp ", |
"FC_Flags ", //25 ///MartinR |
"FC_Flags2 ",///MartinR |
"Compass Setp ", |
"I2C-Error ", |
"BL Limit ", |
"GPS_Nick ", //30 |
"GPS_Roll " |
}; |
|
|
#endif |
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
//++ Sende-Part der Datenübertragung |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
202,7 → 251,12 |
RxdBuffer[buf_ptr] = '\r'; |
if(RxdBuffer[2] == 'R') |
{ |
|
#ifdef WITH_MKTOOL_Display /// MartinW main.h |
#warning : "### with MKTool Display ###" |
LcdClear(); |
#endif |
|
wdt_enable(WDTO_250MS); // Reset-Commando |
ServoActive = 0; |
} |
500,6 → 554,12 |
break; |
case 'j': |
if(MotorenEin) break; |
|
#ifdef WITH_JETI_SIMULATION /// MartinW main.h means no memsave |
#warning : "### with jeti update command ###" |
|
|
|
tempchar1 = LIBFC_GetCPUType(); |
if((tempchar1 == CPU_ATMEGA644P) || (tempchar1 == CPU_ATMEGA1284P)) |
{ |
558,6 → 618,11 |
|
sei(); |
} |
|
#else |
#warning : "### without jeti update command ###" |
|
#endif |
break; |
|
} // case FC_ADDRESS: |
604,7 → 669,11 |
break; |
|
case 'h':// x-1 Displayzeilen |
PcZugriff = 255; |
|
#ifdef WITH_MKTOOL_Display /// MartinW memorysave |
#warning : "### with MKTool Display ###" |
|
PcZugriff = 255; |
if((pRxData[0] & 0x80) == 0x00) // old format |
{ |
DisplayLine = 2; |
624,6 → 693,8 |
PcZugriff = 255; |
MenuePunkt = pRxData[0]; |
DebugDisplayAnforderung1 = 1; |
|
#endif |
break; |
case 'v': // Version-Anforderung und Ausbaustufe |
GetVersionAnforderung = 1; |
701,6 → 772,9 |
Intervall3D = 0; |
} |
|
#ifdef WITH_MKTOOL_Display //main.h |
#warning : "### with MKTool Display ###" |
|
if(((Display_Interval>0 && CheckDelay(Display_Timer)) || DebugDisplayAnforderung) && UebertragungAbgeschlossen) |
{ |
if(DisplayLine > 3)// new format |
723,6 → 797,9 |
SendOutData('L', FC_ADDRESS, 3, &MenuePunkt, sizeof(MenuePunkt), &MaxMenue, sizeof(MaxMenue), DisplayBuff, sizeof(DisplayBuff)); |
DebugDisplayAnforderung1 = 0; |
} |
|
#endif |
|
if(GetVersionAnforderung && UebertragungAbgeschlossen) |
{ |
SendOutData('V', FC_ADDRESS, 1, (unsigned char *) &VersionInfo, sizeof(VersionInfo)); |
765,9 → 842,25 |
} |
if(DebugTextAnforderung != 255) // Texte für die Analogdaten |
{ |
|
|
|
#ifdef WITH_FULL_ANALOG_TEXT /// MartinW main.h means no memsave |
#warning : "### with normal ANALOG_TEXT[32][16] ###" |
unsigned char label[16]; // local sram buffer |
memcpy_P(label, ANALOG_TEXT[DebugTextAnforderung], 16); // read lable from flash to sra |
SendOutData('A', FC_ADDRESS, 2, (unsigned char *)&DebugTextAnforderung, sizeof(DebugTextAnforderung),label, 16); |
|
#else |
#warning : "### with reduced ANALOG_TEXT[32][13] ###" |
|
unsigned char label[16]=" "; // local sram buffer ///MartinW; for MKTool, needs 32 bytes |
memcpy_P(label, ANALOG_TEXT[DebugTextAnforderung], 13); // read lable from flash to sra |
SendOutData('A', FC_ADDRESS, 2, (unsigned char *)&DebugTextAnforderung, sizeof(DebugTextAnforderung),label, 16); |
#endif |
|
|
|
DebugTextAnforderung = 255; |
} |
if(ConfirmFrame && UebertragungAbgeschlossen) // Datensatz bestätigen |