Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1880 → Rev 1897

/branches/V0.84a_MartinW_Jeti+/uart.c
77,6 → 77,13
unsigned int AboTimeOut = 0;
unsigned volatile char JetiUpdateModeActive = 0;
 
 
 
 
#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
96,9 → 103,9
"Motor 2 ",
"Motor 3 ",
"Motor 4 ", //15
"16 ",
"17 ",
"18 ",
"Motor 5 ",///
"Motor 6 ",///
"nc alt speed ",
"19 ",
"Servo ", //20
"Hovergas ",
105,16 → 112,57
"Current [0.1A] ",
"Capacity [mAh] ",
"Hight Setpoint ",
"25 ", //25
"26 ",
"Motor 7 ", //25 ///
"Motor 8 ",///
"Compass Setpoint",
"I2C-Error ",
"BL Limit ",
"GPS_Nick ", //30
"GPS_Roll "
};
};
#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
"Motor 5 ",///
"Motor 6 ",///
"nc alt speed ",
"19 ",
"Servo ", //20
"Hovergas ",
"Current[0.1A]",
"Capacity[mAh]",
"Hight Setp ",
"Motor 8 ", //25 ///
"Motor 9 ",///
"Compass Setp ",
"I2C-Error ",
"BL Limit ",
"GPS_Nick ", //30
"GPS_Roll "
};
#endif
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++ Sende-Part der Datenübertragung
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
170,7 → 218,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;
}
467,6 → 520,13
}
break;
case 'j':
#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))
{
524,6 → 584,11
 
sei();
}
#else
#warning : "### without jeti update command ###"
 
#endif
break;
 
} // case FC_ADDRESS:
570,6 → 635,10
break;
 
case 'h':// x-1 Displayzeilen
#ifdef WITH_MKTOOL_Dispay /// MartinW memorysave
#warning : "### with MKTool Display ###"
 
PcZugriff = 255;
if((pRxData[0] & 0x80) == 0x00) // old format
{
590,7 → 659,11
PcZugriff = 255;
MenuePunkt = pRxData[0];
DebugDisplayAnforderung1 = 1;
#endif
break;
case 'v': // Version-Anforderung und Ausbaustufe
GetVersionAnforderung = 1;
break;
667,6 → 740,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
689,6 → 765,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));
731,9 → 810,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