Rev 597 | Rev 614 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 597 | Rev 604 | ||
---|---|---|---|
Line 131... | Line 131... | ||
131 | 131 | ||
132 | printf("\n\rFlightControl\n\rHardware:%d.%d\n\rSoftware:V%d.%d%c ",PlatinenVersion/10,PlatinenVersion%10, VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX + 'a'); |
132 | printf("\n\rFlightControl\n\rHardware:%d.%d\n\rSoftware:V%d.%d%c ",PlatinenVersion/10,PlatinenVersion%10, VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX + 'a'); |
133 | printf("\n\r=============================="); |
133 | printf("\n\r=============================="); |
Line 134... | Line 134... | ||
134 | GRN_ON; |
134 | GRN_ON; |
135 | 135 | ||
136 | #define EE_DATENREVISION 68 // wird angepasst, wenn sich die EEPROM-Daten geändert haben |
136 | #define EE_DATENREVISION 69 // wird angepasst, wenn sich die EEPROM-Daten geändert haben |
137 | if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_VALID]) != EE_DATENREVISION) |
137 | if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_VALID]) != EE_DATENREVISION) |
138 | { |
138 | { |
139 | printf("\n\rInit. EEPROM: Generiere Default-Parameter..."); |
139 | printf("\n\rInit. EEPROM: Generiere Default-Parameter..."); |
Line 183... | Line 183... | ||
183 | 183 | ||
184 | LcdClear(); |
184 | LcdClear(); |
185 | I2CTimeout = 5000; |
185 | I2CTimeout = 5000; |
186 | while (1) |
186 | while (1) |
187 | { |
187 | { |
188 | if (UpdateMotor) // ReglerIntervall |
188 | if(UpdateMotor) // ReglerIntervall |
189 | { |
189 | { |
190 | SPI_TransmitByte(); //# |
190 | SPI_TransmitByte(); //# |
191 | UpdateMotor=0; |
191 | UpdateMotor=0; |
192 | //PORTD |= 0x08; |
192 | //PORTD |= 0x08; |
- | 193 | MotorRegler(); |
|
193 | MotorRegler(); |
194 | |
194 | //PORTD &= ~0x08; |
195 | //PORTD &= ~0x08; |
195 | SendMotorData(); |
196 | SendMotorData(); |
196 | ROT_OFF; |
197 | ROT_OFF; |
197 | if(PcZugriff) PcZugriff--; |
198 | if(PcZugriff) PcZugriff--; |
Line 218... | Line 219... | ||
218 | else |
219 | else |
219 | { |
220 | { |
220 | I2CTimeout--; |
221 | I2CTimeout--; |
221 | ROT_OFF; |
222 | ROT_OFF; |
222 | } |
223 | } |
223 | } |
- | |
224 | if(SIO_DEBUG) |
224 | if(SIO_DEBUG && !UpdateMotor) |
225 | { |
225 | { |
226 | DatenUebertragung(); |
226 | DatenUebertragung(); |
227 | BearbeiteRxDaten(); |
227 | BearbeiteRxDaten(); |
228 | } |
228 | } |
229 | else BearbeiteRxDaten(); |
229 | else BearbeiteRxDaten(); |
Line 235... | Line 235... | ||
235 | { |
235 | { |
236 | beeptime = 6000; |
236 | beeptime = 6000; |
237 | BeepMuster = 0x0300; |
237 | BeepMuster = 0x0300; |
238 | } |
238 | } |
239 | } |
239 | } |
240 | - | ||
241 | SPI_StartTransmitPacket();//# |
240 | SPI_StartTransmitPacket();//# |
242 | timer = SetDelay(100); |
241 | timer = SetDelay(100); |
243 | } |
242 | } |
- | 243 | if(UpdateMotor) DebugOut.Analog[26]++; |
|
- | 244 | } |
|
244 | } |
245 | } |
245 | return (1); |
246 | return (1); |
246 | } |
247 | } |