arm/disarm beep indication - Solved
arm/disarm beep indication - Solved
Is there a way to configure a beep when the board is arm/disarm
Thanks.
_________________________________________________________
OK, I've added this functionality for my MW2.3
file: MultiWii.cpp functions: go_arm() , go_disarm()
Add the two lines (red) with asterisk below
void go_arm() {
if(calibratingG == 0
#if defined(ONLYARMWHENFLAT)
&& f.ACC_CALIBRATED
#endif
#if defined(FAILSAFE)
&& failsafeCnt < 2
#endif
) {
if(!f.ARMED && !f.BARO_MODE) { // arm now!
f.ARMED = 1;
headFreeModeHold = att.heading;
magHold = att.heading;
#if defined(VBAT)
if (analog.vbat > NO_VBAT) vbatMin = analog.vbat;
#endif
#ifdef LCD_TELEMETRY // reset some values when arming
#if BARO
BAROaltMax = alt.EstAlt;
#endif
#if GPS
GPS_speedMax = 0;
#endif
#ifdef POWERMETER_HARD
powerValueMaxMAH = 0;
#endif
#endif
#ifdef LOG_PERMANENT
plog.arm++; // #arm events
plog.running = 1; // toggle on arm & disarm to monitor for clean shutdown vs. powercut
// write now.
writePLog();
#endif
alarmArray[0] = 2; //***************************************************************************
}
} else if(!f.ARMED) {
blinkLED(2,255,1);
alarmArray[8] = 1;
}
}
void go_disarm() {
if (f.ARMED) {
f.ARMED = 0;
#ifdef LOG_PERMANENT
plog.disarm++; // #disarm events
plog.armed_time = armedTime ; // lifetime in seconds
if (failsafeEvents) plog.failsafe++; // #acitve failsafe @ disarm
if (i2c_errors_count > 10) plog.i2c++; // #i2c errs @ disarm
plog.running = 0; // toggle @ arm & disarm to monitor for clean shutdown vs. powercut
// write now.
writePLog();
#endif
alarmArray[0] = 2; //***************************************************************************
}
}
Thanks.
_________________________________________________________
OK, I've added this functionality for my MW2.3
file: MultiWii.cpp functions: go_arm() , go_disarm()
Add the two lines (red) with asterisk below
void go_arm() {
if(calibratingG == 0
#if defined(ONLYARMWHENFLAT)
&& f.ACC_CALIBRATED
#endif
#if defined(FAILSAFE)
&& failsafeCnt < 2
#endif
) {
if(!f.ARMED && !f.BARO_MODE) { // arm now!
f.ARMED = 1;
headFreeModeHold = att.heading;
magHold = att.heading;
#if defined(VBAT)
if (analog.vbat > NO_VBAT) vbatMin = analog.vbat;
#endif
#ifdef LCD_TELEMETRY // reset some values when arming
#if BARO
BAROaltMax = alt.EstAlt;
#endif
#if GPS
GPS_speedMax = 0;
#endif
#ifdef POWERMETER_HARD
powerValueMaxMAH = 0;
#endif
#endif
#ifdef LOG_PERMANENT
plog.arm++; // #arm events
plog.running = 1; // toggle on arm & disarm to monitor for clean shutdown vs. powercut
// write now.
writePLog();
#endif
alarmArray[0] = 2; //***************************************************************************
}
} else if(!f.ARMED) {
blinkLED(2,255,1);
alarmArray[8] = 1;
}
}
void go_disarm() {
if (f.ARMED) {
f.ARMED = 0;
#ifdef LOG_PERMANENT
plog.disarm++; // #disarm events
plog.armed_time = armedTime ; // lifetime in seconds
if (failsafeEvents) plog.failsafe++; // #acitve failsafe @ disarm
if (i2c_errors_count > 10) plog.i2c++; // #i2c errs @ disarm
plog.running = 0; // toggle @ arm & disarm to monitor for clean shutdown vs. powercut
// write now.
writePLog();
#endif
alarmArray[0] = 2; //***************************************************************************
}
}
Last edited by ramdg on Mon Apr 28, 2014 7:09 pm, edited 1 time in total.
Re: arm/disarm beep indication
if you have a buzzer connected yes
Re: arm/disarm beep indication
I do have a buzzer but there is no indication.
Re: arm/disarm beep indication
Hi,
I bought a buzzer and one of the purposes was to have a audio signal when arming and disarming, in my case it didn't work either. I didn't look at the code since I think it's not a bug, according to the information on the wiki it's not supposed to make sounds when arming and disarming: http://www.multiwii.com/wiki/index.php?title=Extra_features#Buzzer. Either way, it would be a nice feature to have.
Regards,
Luis Sismeiro
I bought a buzzer and one of the purposes was to have a audio signal when arming and disarming, in my case it didn't work either. I didn't look at the code since I think it's not a bug, according to the information on the wiki it's not supposed to make sounds when arming and disarming: http://www.multiwii.com/wiki/index.php?title=Extra_features#Buzzer. Either way, it would be a nice feature to have.
Regards,
Luis Sismeiro
Re: arm/disarm beep indication
Curious to know why you'd want a beep on arm/disarm.
Isn't the beautiful whirring of motors a dead giveaway that they're armed?
Isn't the beautiful whirring of motors a dead giveaway that they're armed?
Re: arm/disarm beep indication
Andy7 wrote:Curious to know why you'd want a beep on arm/disarm.
Isn't the beautiful whirring of motors a dead giveaway that they're armed?
Hi,
For all the people that don't use the MOTOR_STOP option, yes the motors noise would suffice to indicate that they are armed and running. In my Xcopter I use this option and it would be a good addition to the buzzer sound signals the arm/disarm to alert me but also people that could be near by. Just my 2 euro cents.
Regards,
Luis Sismeiro
Re: arm/disarm beep indication
hey, you will need to code it to beep. i can do it for you. does your buzzer just take normal voltage to beep or a pwm signal. and what version mw are you running
Re: arm/disarm beep indication
haydent wrote:hey, you will need to code it to beep. i can do it for you. does your buzzer just take normal voltage to beep or a pwm signal. and what version mw are you running
Hi,
It would be a good addition to the MultiWii code for everybody with a buzzer. When someone uses the MOTOR_STOP option it would enable the buzzer sound for arm/disarm. My buzzer works with the current 2.3 output, no changes needed to make it sound.
Regards,
Luis Sismeiro
Re: arm/disarm beep indication
there you go
Re: arm/disarm beep indication
haydent wrote:there you go
It would be nice if the change was added to the development trunk.
Re: arm/disarm beep indication - Solved
Hi,
Two suggestions for the code above instead of the red lines. If you want to always beep on arm/disarm:
If you want to beep on arm/disarm only when using MOTOR_STOP option:
Regards,
Luis Sismeiro
Two suggestions for the code above instead of the red lines. If you want to always beep on arm/disarm:
Code: Select all
#ifdef BUZZER
alarmArray[0] = 2;
#endif
If you want to beep on arm/disarm only when using MOTOR_STOP option:
Code: Select all
#ifdef BUZZER && MOTOR_STOP
alarmArray[0] = 2;
#endif
Regards,
Luis Sismeiro