Rev 992 | Rev 1036 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 992 | Rev 993 | ||
---|---|---|---|
Line 179... | Line 179... | ||
179 | MikroKopterFlags &= ~(FLAG_CALIBRATE | FLAG_START); |
179 | MikroKopterFlags &= ~(FLAG_CALIBRATE | FLAG_START); |
180 | ToNaviCtrl.Param.Byte[9] = (unsigned char) UBat; |
180 | ToNaviCtrl.Param.Byte[9] = (unsigned char) UBat; |
181 | ToNaviCtrl.Param.Byte[10] =(unsigned char) EE_Parameter.UnterspannungsWarnung; |
181 | ToNaviCtrl.Param.Byte[10] =(unsigned char) EE_Parameter.UnterspannungsWarnung; |
182 | ToNaviCtrl.Param.Byte[11] =(unsigned char) eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET]); |
182 | ToNaviCtrl.Param.Byte[11] =(unsigned char) eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET]); |
183 | break; |
183 | break; |
184 | - | ||
185 | case SPI_CMD_PARAMETER1: |
184 | case SPI_CMD_PARAMETER1: |
186 | ToNaviCtrl.Param.Byte[0] = Parameter_NaviGpsModeControl; // Parameters for the Naviboard |
185 | ToNaviCtrl.Param.Byte[0] = EE_Parameter.NaviGpsModeControl; // Parameters for the Naviboard |
187 | ToNaviCtrl.Param.Byte[1] = Parameter_NaviGpsGain; |
186 | ToNaviCtrl.Param.Byte[1] = EE_Parameter.NaviGpsGain; |
188 | ToNaviCtrl.Param.Byte[2] = Parameter_NaviGpsP; |
187 | ToNaviCtrl.Param.Byte[2] = EE_Parameter.NaviGpsP; |
189 | ToNaviCtrl.Param.Byte[3] = Parameter_NaviGpsI; |
188 | ToNaviCtrl.Param.Byte[3] = EE_Parameter.NaviGpsI; |
190 | ToNaviCtrl.Param.Byte[4] = Parameter_NaviGpsD; |
189 | ToNaviCtrl.Param.Byte[4] = EE_Parameter.NaviGpsD; |
191 | ToNaviCtrl.Param.Byte[5] = Parameter_NaviGpsACC; |
190 | ToNaviCtrl.Param.Byte[5] = EE_Parameter.NaviGpsACC; |
192 | ToNaviCtrl.Param.Byte[6] = EE_Parameter.NaviGpsMinSat; |
191 | ToNaviCtrl.Param.Byte[6] = EE_Parameter.NaviGpsMinSat; |
193 | ToNaviCtrl.Param.Byte[7] = EE_Parameter.NaviStickThreshold; |
192 | ToNaviCtrl.Param.Byte[7] = EE_Parameter.NaviStickThreshold; |
194 | ToNaviCtrl.Param.Byte[8] = 15; // MaxRadius |
193 | ToNaviCtrl.Param.Byte[8] = EE_Parameter.NaviOperatingRadius; |
- | 194 | ToNaviCtrl.Param.Byte[9] = EE_Parameter.NaviWindCorrection; |
|
- | 195 | ToNaviCtrl.Param.Byte[10] = EE_Parameter.NaviSpeedCompensation; |
|
195 | break; |
196 | break; |
196 | - | ||
197 | case SPI_CMD_STICK: |
197 | case SPI_CMD_STICK: |
198 | tmp = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]; if(tmp > 127) tmp = 127; else if(tmp < -127) tmp = -127; |
198 | tmp = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]; if(tmp > 127) tmp = 127; else if(tmp < -127) tmp = -127; |
199 | ToNaviCtrl.Param.Byte[0] = (char) tmp; |
199 | ToNaviCtrl.Param.Byte[0] = (char) tmp; |
200 | tmp = PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; if(tmp > 127) tmp = 127; else if(tmp < -127) tmp = -127; |
200 | tmp = PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; if(tmp > 127) tmp = 127; else if(tmp < -127) tmp = -127; |
201 | ToNaviCtrl.Param.Byte[1] = (char) tmp; |
201 | ToNaviCtrl.Param.Byte[1] = (char) tmp; |