Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1868 → Rev 1887

/branches/dongfang_FC_rewrite/configuration.c
53,7 → 53,6
#include <stddef.h>
#include "configuration.h"
#include "eeprom.h"
#include "timer0.h"
 
int16_t variables[8] = {0,0,0,0,0,0,0,0};
dynamicParam_t dynamicParams = {48,251,16,58,64,8,150,150,2,10,{0,0,0,0,0,0,0,0},100,70,90,65,64,100,0,0,0};
234,60 → 233,3
GRN_OFF;
return BoardRelease;
}
 
void beep(uint16_t millis) {
BeepTime = millis;
}
 
/*
* Make [numbeeps] beeps.
*/
void beepNumber(uint8_t numbeeps) {
while(numbeeps--) {
if(MKFlags & MKFLAG_MOTOR_RUN) return; //auf keinen Fall bei laufenden Motoren!
beep(100); // 0.1 second
Delay_ms(250); // blocks 250 ms as pause to next beep,
// this will block the flight control loop,
// therefore do not use this function if motors are running
}
}
 
/*
* Beep the R/C alarm signal
*/
void beepRCAlarm(void) {
if(BeepModulation == 0xFFFF) { // If not already beeping an alarm signal (?)
BeepTime = 15000; // 1.5 seconds
BeepModulation = 0x0C00;
}
}
 
/*
* Beep the I2C bus error signal
*/
void beepI2CAlarm(void) {
if((BeepModulation == 0xFFFF) && (MKFlags & MKFLAG_MOTOR_RUN)) {
BeepTime = 10000; // 1 second
BeepModulation = 0x0080;
}
}
 
/*
* Beep the battery low alarm signal
*/
void beepBatteryAlarm(void) {
BeepModulation = 0x0300;
if(!BeepTime) {
BeepTime = 6000; // 0.6 seconds
}
}
 
/*
* Beep the EEPROM checksum alarm
*/
void beepEEPROMAlarm(void) {
BeepModulation = 0x0007;
if(!BeepTime) {
BeepTime = 6000; // 0.6 seconds
}
}