Buzzer- ArmedTimeWarning Error

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Buzzer- ArmedTimeWarning Error

Post by brettwal »

When I uncomment ARMEDTIMEWARNING and try to compile
/********************************************************************/
/**** Buzzer ****/
/********************************************************************/
#define BUZZER
#define RCOPTIONSBEEP //uncomment this if you want the buzzer to beep at any rcOptions change on channel Aux1 to Aux4
#define ARMEDTIMEWARNING 480 // Trigger an alarm after a certain time of being armed [s] to save you lipo (if your TX does not have a countdown)

I get the error below

MultiWii_2_1.cpp: In function 'void buzzer(uint8_t)':
Buzzer:46: error: 'armedTime' was not declared in this scope



Seems a very simple fix but, I'm far from a programmer. I know it just means that the variable is not defined here and I can set it to 0 and it will compile, but I'm certain it needs to come from somewhere else and not just be set to 0. Any help woul be appreciated.

User avatar
dramida
Posts: 473
Joined: Mon Feb 28, 2011 12:58 pm
Location: Bucharest
Contact:

Re: Buzzer- ArmedTimeWarning Error

Post by dramida »

I had the same situation with atmega328 board. No solution yet.

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: Buzzer- ArmedTimeWarning Error

Post by brettwal »

dramida wrote:I had the same situation with atmega328 board. No solution yet.


Ashame since it would seem to be an easy fix.

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Buzzer- ArmedTimeWarning Error

Post by jevermeister »

armedtime is declared if you enable telemetry.
so you have to enable telemtry to use this feature.

it is already fixed in the trunk moments after release of 2.1
:-(

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: Buzzer- ArmedTimeWarning Error

Post by brettwal »

jevermeister wrote:armedtime is declared if you enable telemetry.
so you have to enable telemtry to use this feature.

it is already fixed in the trunk moments after release of 2.1
:-(



Thanks, worked like a charm. Another vote for proper documentation.

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Buzzer- ArmedTimeWarning Error

Post by jevermeister »

Hi,

it is a bug introduced by a stupid user called Jevermeister ;-)

If you want to have it clean and save memory do this:

Find this in Multiwii.ino Lino 139

Code: Select all

#if defined(LOG_VALUES) || defined(LCD_TELEMETRY)
  static uint32_t armedTime = 0;
#endif


and change it to this:

Code: Select all

#if defined(LOG_VALUES) || defined(LCD_TELEMETRY) || defined(ARMEDTIMEWARNING)
  static uint32_t armedTime = 0;
#endif


Sorry for the incovenience.

Nils

User avatar
brettwal
Posts: 93
Joined: Mon Jun 18, 2012 4:51 pm
Location: Louisiana

Re: Buzzer- ArmedTimeWarning Error

Post by brettwal »

Not stupid at all. I make mistakes everyday. As large as this codebase has become, things can easily be overlooked. Many thanks for all the hard work the programmers have put into this. I could go out and pay a ridiculous amount for an FC that is "supposed" to work out of the box, but I much rather use MultiWii which is free and draws from the brains and innovations of the communtiy. I spend more time building and tweaking than I actually do flying. If it worked out of the box, it would be boring!

Post Reply