Rev 2048 | Rev 2052 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2048 | Rev 2051 | ||
---|---|---|---|
Line 96... | Line 96... | ||
96 | "heightError ", |
96 | "heightError ", |
97 | "HeightPdThrottle", |
97 | "HeightPdThrottle", |
98 | "HeightIdThrottle", //25 |
98 | "HeightIdThrottle", //25 |
99 | "HeightDdThrottle", |
99 | "HeightDdThrottle", |
100 | "HeadingInDegrees", |
100 | "HeadingInDegrees", |
101 | "TargetHeadingDeg", |
101 | "0 ", |
102 | "Diff ", |
102 | "1 ", |
103 | " ", //30 |
103 | "2 ", //30 |
104 | "navi mode " |
104 | "3 " |
105 | }; |
105 | }; |
Line 106... | Line 106... | ||
106 | 106 | ||
107 | /****************************************************************/ |
107 | /****************************************************************/ |
108 | /* Initialization of the USART0 */ |
108 | /* Initialization of the USART0 */ |
Line 508... | Line 508... | ||
508 | break; |
508 | break; |
Line 509... | Line 509... | ||
509 | 509 | ||
510 | case 's': // save settings |
510 | case 's': // save settings |
511 | if (!(MKFlags & MKFLAG_MOTOR_RUN)) // save settings only if motors are off |
511 | if (!(MKFlags & MKFLAG_MOTOR_RUN)) // save settings only if motors are off |
512 | { |
512 | { |
513 | if ((1 <= pRxData[0]) && (pRxData[0] <= 5) && (pRxData[1] == EEPARAM_REVISION)) // check for setting to be in range and version of settings |
513 | 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 |
514 | { |
514 | { |
515 | memcpy(&staticParams, (uint8_t*) &pRxData[2], sizeof(staticParams)); |
515 | memcpy(&staticParams, (uint8_t*) &pRxData[3], sizeof(staticParams)); |
516 | paramSet_writeToEEProm(pRxData[0]); |
516 | paramSet_writeToEEProm(pRxData[0]); |
517 | tempchar[0] = getActiveParamSet(); |
517 | tempchar[0] = getActiveParamSet(); |
518 | beepNumber(tempchar[0]); |
518 | beepNumber(tempchar[0]); |
519 | } else { |
519 | } else { |