Bug in v2.2: Some #define-values from 'config.h' are ignored

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
Edgar
Posts: 13
Joined: Tue Jul 17, 2012 2:08 pm

Bug in v2.2: Some #define-values from 'config.h' are ignored

Post by Edgar »

Hi community!

This time, I think I've really found a little problem in the v2.2. Description is as follows:

I'm using the VBAT functionality (#define VBAT) to get informed about the battery voltage via buzzer.
When I tried to tweak the warning voltage levels in the VBAT section of the 'config.h' a little bit to my taste, I've noticed that my changes never had any effect. After a little investigation via GUI and debug output of the relating vars, I've found out that the #define-values from the 'config.h' are never loaded into the ram conf-struct. Confused and digging a little bit further, I saw why: The only place where this is done, is in the 'LoadDefaults'-function of 'EEPROM.ino'. But this function is only executed, when the eeprom checksum isn't correct (e.g. at first run after upgrading(?))

So, if the fellow multiwii-user wants to alter some settings in the 'config.h' after he had used v2.2 already, and re-uploads the software with the changed values to the flight controller, he'd always have to clear the eeprom afterwards, to achieve that the changes take effect. I don't think, that this is the wanted behavior. I haven't looked, if there are any other settings than the bat-voltage levels are affected also. And I could have tried to fix it on my own, but I thought I'd better do it via the community, so others would also benefit.

I hope, I don't get bashed here if I'm completely wrong with my assumptions, and if I've to change something in this post (e.g. the title to be maybe more descriptive, etc.), please just tell me.

Greets,
Edgar

P.S.: Another small observation: Battery voltage warning level 1 seems to be never output to the buzzer

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: Bug in v2.2: Some #define-values from 'config.h' are ign

Post by alll »

+1, had the same weird behavior trying to set VBAT config parameters. Didn't debuged it thought.
manu

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Bug in v2.2: Some #define-values from 'config.h' are ignored

Post by EOSBandi »

This is normal behaviour. Altought documentation is not really completed on it.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Bug in v2.2: Some #define-values from 'config.h' are ign

Post by Hamburger »

Edgar wrote:I hope, I don't get bashed here if I'm completely wrong with my assumptions, and if I've to change something in this post (e.g. the title to be maybe more descriptive, etc.), please just tell me.
P.S.: Another small observation: Battery voltage warning level 1 seems to be never output to the buzzer

For v2.2, did you read the note at top of config.h? While not the most desirable functionality it covers a temporary shortcoming of the gui. Besides, you can always use save/load in the gui to carry.over your precious PID param values.

With latest dev code you get
-fixed vbat warning level1
-automatic update to config.h values with every flash-checksum change.
good luck.

Mis
Posts: 203
Joined: Fri Apr 01, 2011 12:23 am

Re: Bug in v2.2: Some #define-values from 'config.h' are ign

Post by Mis »

Edgar. This problem with #define is solved in dev version r1389. I recomend use r1399 dev version or newer.

Edgar
Posts: 13
Joined: Tue Jul 17, 2012 2:08 pm

Re: Bug in v2.2: Some #define-values from 'config.h' are ign

Post by Edgar »

Thanks!

Edgar
Posts: 13
Joined: Tue Jul 17, 2012 2:08 pm

Re: Bug in v2.2: Some #define-values from 'config.h' are ign

Post by Edgar »

btw, can anybody tell me, where I can find the versions r1389, r1399 for download?
at http://code.google.com/p/multiwii/downloads/list the latest version is r1391

Post Reply