Rev 2058 | Rev 2067 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2058 | Rev 2059 | ||
---|---|---|---|
Line 100... | Line 100... | ||
100 | "YawTerm ", |
100 | "YawTerm ", |
101 | "M1 ", //10 |
101 | "M1 ", //10 |
102 | "M2 ", |
102 | "M2 ", |
103 | "M3 ", |
103 | "M3 ", |
104 | "M4 ", |
104 | "M4 ", |
105 | "pdpart ", |
105 | "controlActivity ", |
106 | "control ", //15 |
106 | "accVector ", //15 |
107 | "RC Stick P ", |
107 | "RC Stick P ", |
108 | "RC Stick R ", |
108 | "RC Stick R ", |
109 | "Stick P w GPS ", |
109 | "RC Stick T ", |
110 | "Stick R w GPS ", |
110 | "RC Stick Y ", |
111 | "Stick P w Emerg.", //20 |
111 | "Stick P w Emerg.", //20 |
112 | "Stick R w Emerg.", |
112 | "Stick R w Emerg.", |
113 | "Height[dm] ", |
113 | "Height[dm] ", |
114 | "dHeight ", |
114 | "dHeight ", |
115 | "Altitude ", |
115 | "Altitude ", |
116 | " ", //25 |
116 | "EFT ", //25 |
117 | "naviPitch ", |
117 | "naviPitch ", |
118 | "naviRoll ", |
118 | "naviRoll ", |
119 | "i part contrib ", |
119 | "i part contrib ", |
120 | "HeadingError ", |
120 | " ", |
121 | "Magnetic Heading", //30 |
121 | " ", //30 |
122 | "GPS Datasets " |
122 | " " |
123 | }; |
123 | }; |
Line 124... | Line 124... | ||
124 | 124 | ||
125 | /****************************************************************/ |
125 | /****************************************************************/ |
126 | /* Initialization of the USART0 */ |
126 | /* Initialization of the USART0 */ |
Line 198... | Line 198... | ||
198 | versionInfo.SWMinor = VERSION_MINOR; |
198 | versionInfo.SWMinor = VERSION_MINOR; |
199 | versionInfo.SWPatch = VERSION_PATCH; |
199 | versionInfo.SWPatch = VERSION_PATCH; |
200 | versionInfo.protoMajor = VERSION_SERIAL_MAJOR; |
200 | versionInfo.protoMajor = VERSION_SERIAL_MAJOR; |
201 | versionInfo.protoMinor = VERSION_SERIAL_MINOR; |
201 | versionInfo.protoMinor = VERSION_SERIAL_MINOR; |
Line 202... | Line -... | ||
202 | - | ||
203 | for (uint8_t i=0; i<32; i++) { |
- | |
204 | debugOut.analog[i] = i; |
- | |
205 | } |
- | |
206 | 202 | ||
207 | // restore global interrupt flags |
203 | // restore global interrupt flags |
208 | SREG = sreg; |
204 | SREG = sreg; |
Line 209... | Line 205... | ||
209 | } |
205 | } |
Line 288... | Line 284... | ||
288 | uint16_t tmpchecksum = 0, i; |
284 | uint16_t tmpchecksum = 0, i; |
289 | for (i = 0; i < datalen; i++) { |
285 | for (i = 0; i < datalen; i++) { |
290 | tmpchecksum += txd_buffer[i]; |
286 | tmpchecksum += txd_buffer[i]; |
291 | } |
287 | } |
292 | tmpchecksum %= 4096; |
288 | tmpchecksum %= 4096; |
293 | txd_buffer[i++] = '=' + tmpchecksum >> 6; |
289 | txd_buffer[i++] = '=' + (tmpchecksum >> 6); |
294 | txd_buffer[i++] = '=' + tmpchecksum & 0x3F; |
290 | txd_buffer[i++] = '=' + (tmpchecksum & 0x3F); |
295 | txd_buffer[i++] = '\r'; |
291 | txd_buffer[i++] = '\r'; |
296 | txd_complete = FALSE; |
292 | txd_complete = FALSE; |
297 | UDR0 = txd_buffer[0]; // initiates the transmittion (continued in the TXD ISR) |
293 | UDR0 = txd_buffer[0]; // initiates the transmittion (continued in the TXD ISR) |
298 | } |
294 | } |
Line 512... | Line 508... | ||
512 | if (pRxData[0] < 1) |
508 | if (pRxData[0] < 1) |
513 | pRxData[0] = 1; // limit to 1 |
509 | pRxData[0] = 1; // limit to 1 |
514 | else if (pRxData[0] > 5) |
510 | else if (pRxData[0] > 5) |
515 | pRxData[0] = 5; // limit to 5 |
511 | pRxData[0] = 5; // limit to 5 |
516 | // load requested parameter set |
512 | // load requested parameter set |
- | 513 | ||
- | 514 | debugOut.analog[30] = staticParams.GPSMininumSatellites; |
|
- | 515 | ||
517 | paramSet_readFromEEProm(pRxData[0]); |
516 | paramSet_readFromEEProm(pRxData[0]); |
- | 517 | ||
518 | tempchar[0] = pRxData[0]; |
518 | tempchar[0] = pRxData[0]; |
519 | tempchar[1] = EEPARAM_REVISION; |
519 | tempchar[1] = EEPARAM_REVISION; |
520 | tempchar[2] = sizeof(staticParams); |
520 | tempchar[2] = sizeof(staticParams); |
521 | while (!txd_complete) |
521 | while (!txd_complete) |
522 | ; // wait for previous frame to be sent |
522 | ; // wait for previous frame to be sent |
Line 528... | Line 528... | ||
528 | { |
528 | { |
529 | 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 |
529 | 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 |
530 | { |
530 | { |
531 | memcpy(&staticParams, (uint8_t*) &pRxData[3], sizeof(staticParams)); |
531 | memcpy(&staticParams, (uint8_t*) &pRxData[3], sizeof(staticParams)); |
532 | paramSet_writeToEEProm(pRxData[0]); |
532 | paramSet_writeToEEProm(pRxData[0]); |
- | 533 | setActiveParamSet(pRxData[0]); |
|
- | 534 | configuration_paramSetDidChange(); |
|
533 | tempchar[0] = getActiveParamSet(); |
535 | tempchar[0] = getActiveParamSet(); |
534 | beepNumber(tempchar[0]); |
536 | beepNumber(tempchar[0]); |
535 | } else { |
537 | } else { |
536 | tempchar[0] = 0; //indicate bad data |
538 | tempchar[0] = 0; //indicate bad data |
537 | } |
539 | } |