Rev 2554 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2554 | Rev 2559 | ||
---|---|---|---|
Line 237... | Line 237... | ||
237 | 237 | ||
238 | 238 | ||
239 | void Piep(unsigned char Anzahl, unsigned int dauer) |
239 | void Piep(unsigned char Anzahl, unsigned int dauer) |
- | 240 | { |
|
240 | { |
241 | unsigned int wait = 0; |
241 | unsigned int wait = 0; |
242 | unsigned char update_spi = 12; |
242 | if(MotorenEin) return; //auf keinen Fall im Flug! |
243 | if(MotorenEin) return; //auf keinen Fall im Flug! |
243 | GRN_OFF; |
244 | GRN_OFF; |
244 | while(Anzahl--) |
245 | while(Anzahl--) |
Line 250... | Line 251... | ||
250 | if(UpdateMotor) |
251 | if(UpdateMotor) |
251 | { |
252 | { |
252 | UpdateMotor = 0; |
253 | UpdateMotor = 0; |
253 | if(!beeptime) wait--; |
254 | if(!beeptime) wait--; |
254 | LIBFC_Polling(); |
255 | LIBFC_Polling(); |
- | 256 | update_spi--; |
|
255 | }; |
257 | }; |
- | 258 | if(update_spi == 0) // 41Hz |
|
- | 259 | { |
|
- | 260 | if(SPI_StartTransmitPacket()) update_spi = 12; |
|
- | 261 | else |
|
- | 262 | if(BytegapSPI == 0) SPI_TransmitByte(); |
|
- | 263 | } |
|
- | 264 | else if(BytegapSPI == 0) SPI_TransmitByte(); |
|
256 | } |
265 | } |
257 | } |
266 | } |
258 | GRN_ON; |
267 | GRN_ON; |
259 | } |
268 | } |