Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2050 → Rev 2051

/branches/dongfang_FC_rewrite/uart0.c
98,10 → 98,10
"HeightIdThrottle", //25
"HeightDdThrottle",
"HeadingInDegrees",
"TargetHeadingDeg",
"Diff ",
" ", //30
"navi mode "
"0 ",
"1 ",
"2 ", //30
"3 "
};
 
/****************************************************************/
510,9 → 510,9
case 's': // save settings
if (!(MKFlags & MKFLAG_MOTOR_RUN)) // save settings only if motors are off
{
if ((1 <= pRxData[0]) && (pRxData[0] <= 5) && (pRxData[1] == EEPARAM_REVISION)) // check for setting to be in range and version of settings
if ((1 <= pRxData[0]) && (pRxData[0] <= 5) && (pRxData[1] == EEPARAM_REVISION) && (pRxData[2] == sizeof(staticParams))) // check for setting to be in range and version of settings
{
memcpy(&staticParams, (uint8_t*) &pRxData[2], sizeof(staticParams));
memcpy(&staticParams, (uint8_t*) &pRxData[3], sizeof(staticParams));
paramSet_writeToEEProm(pRxData[0]);
tempchar[0] = getActiveParamSet();
beepNumber(tempchar[0]);