Three independent, stick selectable settings in EEPROM
Three independent, stick selectable settings in EEPROM
Hi !
Is done in r1147
For change setting number via sticks (at disarmed state):
SET1 - ROLL left + YAW left + THROTTLE min. - one confirmation beep and led blink
SET2 - PITCH up + YAW left + THROTTLE min. - two confirmation beep and led blink
SET3 - ROLL right + YAW left + THROTTLE min. - three confirmation beep and led blink
Last used setting number is stored in eeprom and and after next power up we hear one, two or three beeps indicating what settings are loaded.
Any setting have full configuration structure inside, and we must calibrate ACC and MAG in each setting separatly.
Temporarily the GUI show active setting number as "Power"... We need new GUI.
For now, after change the setting number via sticks, we must click "READ" button on GUI for read current config, then setup it, then click "WRITE"
New serial MSP command added: MSP_SELECT_SETTING - in message, Select Setting Number (0-2)
On future, the calibration data should be moved to separate "global" settings structure... But not all at once
Is done in r1147
For change setting number via sticks (at disarmed state):
SET1 - ROLL left + YAW left + THROTTLE min. - one confirmation beep and led blink
SET2 - PITCH up + YAW left + THROTTLE min. - two confirmation beep and led blink
SET3 - ROLL right + YAW left + THROTTLE min. - three confirmation beep and led blink
Last used setting number is stored in eeprom and and after next power up we hear one, two or three beeps indicating what settings are loaded.
Any setting have full configuration structure inside, and we must calibrate ACC and MAG in each setting separatly.
Temporarily the GUI show active setting number as "Power"... We need new GUI.
For now, after change the setting number via sticks, we must click "READ" button on GUI for read current config, then setup it, then click "WRITE"
New serial MSP command added: MSP_SELECT_SETTING - in message, Select Setting Number (0-2)
On future, the calibration data should be moved to separate "global" settings structure... But not all at once
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Excellent idea!Good way to implement it with the stick combos.
Nils
Nils
Re: Three independent, stick selectable settings in EEPROM
What do we want to call these? Some commercial systems *cough* vbar *cough* call this "Bank Select". Do we want to call them "banks", or something else?
And... do you want someone to take a shot at the GUI? I'd be happy to make those changes.
And... do you want someone to take a shot at the GUI? I'd be happy to make those changes.
Re: Three independent, stick selectable settings in EEPROM
The name... hmmm maybe "Profiles" ?
In GUI we need three buttons for profile switching. Click on button should send MSP_SELECT_SETTING command with 1 byte of parameter called profile number (0..2 for profile 1..3). Then gui should perform "READ" click. Second change is displaying of current selected setting. This may be done by marking one of profile button as green, and other as red. I think about extend MSP_STATUS command adding current profile number as last one byte of payload.
Now this is commented out because current GUI not work corectly with 11byte transferred in MSP_STATUS command.
BTW
I'm working on short implementation of "global settings" for storing profile number, ACC and MAG calibration data and maybe some other global params. After this we don't need to repeat ACC and MAG calibration in each profile.
In GUI we need three buttons for profile switching. Click on button should send MSP_SELECT_SETTING command with 1 byte of parameter called profile number (0..2 for profile 1..3). Then gui should perform "READ" click. Second change is displaying of current selected setting. This may be done by marking one of profile button as green, and other as red. I think about extend MSP_STATUS command adding current profile number as last one byte of payload.
Now this is commented out because current GUI not work corectly with 11byte transferred in MSP_STATUS command.
BTW
I'm working on short implementation of "global settings" for storing profile number, ACC and MAG calibration data and maybe some other global params. After this we don't need to repeat ACC and MAG calibration in each profile.
Re: Three independent, stick selectable settings in EEPROM
Interesting, it was wished for for a long time.
One question:
why not have a single stick combo to increment current setting number, so you can cycle through the settings step by step?
Then it was independant of number of stored settings. Also easier to increase number of stored settings, you do not run out of stick combos so fast - we only have a limited number of stick combos for all future features to come.
One question:
why not have a single stick combo to increment current setting number, so you can cycle through the settings step by step?
Then it was independant of number of stored settings. Also easier to increase number of stored settings, you do not run out of stick combos so fast - we only have a limited number of stick combos for all future features to come.
Re: Three independent, stick selectable settings in EEPROM
+1 ! Awesome!
Name them "Flight mode" as in heli setups?
Name them "Flight mode" as in heli setups?
Re: Three independent, stick selectable settings in EEPROM
not sure whether it is safe to switch during flight, but maybe we could also offer a checkbox item for tying the 'flight mode' selection to aux channels?
Re: Three independent, stick selectable settings in EEPROM
Hamburger, you can't switch profile (i like this name ) during flight. Switching is only possible if disarmed, even from PC.
I'm not use sequential change via single stick combination because we not have sure feedback about current setting number. If you enable RCOPTIONSBEEP (i like this option), you can hear additional beep during profile change, because BOXes can have different layout. In current implementation if you switch to first profile and hear two beep's, and you not sure about selected profile, you can switch one more time to first profile, and now propertly hear only one beep.
Dev r1148 commited. Added global_conf struct for calibration datas storage.
From now calibration of MAG and ACC on each profile is not needed. Calibration is independent from selected profile.
If calibration datas is bad - the LED constantly blink (like in high tilted state) until we calibrate ACC.
I'm not use sequential change via single stick combination because we not have sure feedback about current setting number. If you enable RCOPTIONSBEEP (i like this option), you can hear additional beep during profile change, because BOXes can have different layout. In current implementation if you switch to first profile and hear two beep's, and you not sure about selected profile, you can switch one more time to first profile, and now propertly hear only one beep.
Dev r1148 commited. Added global_conf struct for calibration datas storage.
From now calibration of MAG and ACC on each profile is not needed. Calibration is independent from selected profile.
If calibration datas is bad - the LED constantly blink (like in high tilted state) until we calibrate ACC.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Wouldnt it be good to add a buzzer alarm for not calibrated acc?
The beeps of aux kicking in is an issue i could not get rid od yet .
Any ideas?
The beeps of aux kicking in is an issue i could not get rid od yet .
Any ideas?
Re: Three independent, stick selectable settings in EEPROM
jevermeister wrote:Wouldnt it be good to add a buzzer alarm for not calibrated acc?
Maybe this is not a buzzer , but for now you see constantly blinking onboard LED, and can't arm the copter. Until you calibrate ACC.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Being unable to arm is very good. I killed a couple of props by forgetting to calibrate
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Three independent, stick selectable settings in EEPROM
I think it's an interesting mod which should allow a switch between cool & 3D config.
Some items could probably also migrate in the global_conf struct, like angleTrim
Some items could probably also migrate in the global_conf struct, like angleTrim
Re: Three independent, stick selectable settings in EEPROM
I not add the angleTrims because I'm not sure about role of angleTrim, but OK, i can move it to global_config. Some more variables should be global ? I think about battery alarm levels, but someone need two configurations for flying with 3S or 4S battery, and in this case different alarms should be good option.
Last edited by Mis on Sun Sep 30, 2012 9:19 pm, edited 2 times in total.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Yeah! I like where this is goong. Another very important and handy feature added.
Re: Three independent, stick selectable settings in EEPROM
One more question about angleTrims. This is not depended from copter setup (e.g. additional weight at front - with camera) ?. If yes, this should be moved to global.conf. I do not want to hunt for it with a million of #ifdef options.
Re: Three independent, stick selectable settings in EEPROM
Alexinparis wrote:I think it's an interesting mod which should allow a switch between cool & 3D config.
that is what I thought too. But Mis commented on that idea already:
Mis wrote:Hamburger, you can't switch profile (i like this name ) during flight. Switching is only possible if disarmed, even from PC
Any chance to maybe separate those settings that could safely altered during flight and those that could not? Or is it simply the time penalty for reading and re-initializing that forbids switching profiles?
I would like to see the profile select bound to a 3 position switch and an aux channel, same as is possible with acro-horizon-angle mode today.
Mis, keep going please.
Re: Three independent, stick selectable settings in EEPROM
I'm not sure, if it's safe for switching profile during flight. IMHO better is leave as is, eg. select profile before arming.
BTW. Now we need new PC configuration software with selecting profile support. I'm not PC side programmer, and can't make this.
BTW. Now we need new PC configuration software with selecting profile support. I'm not PC side programmer, and can't make this.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Me neither but if noone is ti be found I will try.
Btw.: I noticed Andras (Eosbandi) hasn' t been here for a while. Anyone knows where he went?
Btw.: I noticed Andras (Eosbandi) hasn' t been here for a while. Anyone knows where he went?
Re: Three independent, stick selectable settings in EEPROM
Mis wrote:I'm not sure, if it's safe for switching profile during flight. IMHO better is leave as is, eg. select profile before arming.
BTW. Now we need new PC configuration software with selecting profile support. I'm not PC side programmer, and can't make this.
I will volunteer for the PC/GUI side, if you are OK with that.
Danal
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Three independent, stick selectable settings in EEPROM
jevermeister wrote:Me neither but if noone is ti be found I will try.
Btw.: I noticed Andras (Eosbandi) hasn' t been here for a while. Anyone knows where he went?
I asked that same question here, where is Andras: viewtopic.php?f=16&t=2558
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Three independent, stick selectable settings in EEPROM
I had some time this afternoon, and did the mod
Re: Three independent, stick selectable settings in EEPROM
Alexinparis wrote:I had some time this afternoon, and did the mod
258 - headSerialReply(10);
258 + headSerialReply(11);
wasn't the whole point of new serial protocol so stuff like this doesn't happen?
so now GUI software will need to check length of MSP_STATUS and if its 10 bytes, thats old version and if its 11, its new?
< dongs> if they're gonna start doing profiles
< dongs> they need a whole new shit
< dongs> get/set profile stuff
< dongs> not tacking it on some totally unrelated shit
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Three independent, stick selectable settings in EEPROM
1) If the GUI third party soft is implemented like the java one, the message length can change transparently because it must be read during the protocol recognition process.
2) If a new var is added at the end of an existing message (the order is important), there should be no consequence for "non aware" GUI.
It is just stacked in the read message buffer and ignored. I checked with an old version of the GUI.
2) If a new var is added at the end of an existing message (the order is important), there should be no consequence for "non aware" GUI.
It is just stacked in the read message buffer and ignored. I checked with an old version of the GUI.
Re: Three independent, stick selectable settings in EEPROM
Alexinparis wrote:1) If the GUI third party soft is implemented like the java one, the message length can change transparently because it must be read during the protocol recognition process.
2) If a new var is added at the end of an existing message (the order is important), there should be no consequence for "non aware" GUI.
It is just stacked in the read message buffer and ignored. I checked with an old version of the GUI.
1) MultiWiiConf doesn't use the length of the message and just assumes MSPs are of a certain length In other words, the MSP_STATUS case of the switch statement assumes there are 11 bytes available now, but if an old MultiWii version is connected there will be only 10 bytes in that message and the GUI will break. Tested for that?
2) That is true, but it still is a new feature that would have deserved its own MSPs, does it not?
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Hi,
could you please add a beep_confirmation=1 when finised writing params, blinkLED does not trigger the buzzer anymore.
I found it useful to let the copter beep when I succesfully uploaded params from gui or bluetooth,
also get rid of the if b==1, b is not set by gui or bluetooth.
Thank you, nils
could you please add a beep_confirmation=1 when finised writing params, blinkLED does not trigger the buzzer anymore.
I found it useful to let the copter beep when I succesfully uploaded params from gui or bluetooth,
also get rid of the if b==1, b is not set by gui or bluetooth.
Thank you, nils
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Three independent, stick selectable settings in EEPROM
Sebbi wrote:Alexinparis wrote:1) If the GUI third party soft is implemented like the java one, the message length can change transparently because it must be read during the protocol recognition process.
2) If a new var is added at the end of an existing message (the order is important), there should be no consequence for "non aware" GUI.
It is just stacked in the read message buffer and ignored. I checked with an old version of the GUI.
1) MultiWiiConf doesn't use the length of the message and just assumes MSPs are of a certain length In other words, the MSP_STATUS case of the switch statement assumes there are 11 bytes available now, but if an old MultiWii version is connected there will be only 10 bytes in that message and the GUI will break. Tested for that?
2) That is true, but it still is a new feature that would have deserved its own MSPs, does it not?
1) To be more accurate, MultiWiiConf just assumes MSPs are of a minimum length to fill correctly the GUI. But if this length is smaller (an old MultiWii version for instance), a weird data is read in the message buffer, no crash to expect.
2) current profile setting is a kind of status indication, but if you find a dedicated message should be used, why not I understand he point
Re: Three independent, stick selectable settings in EEPROM
1) I looked at the code again and it seems you are right. But read8() will use and old byte from the inputbuffer (e.g. from the last received MSP) and not wait forever because this byte will not arrive. But it doesn't check the value ... so it might not break the GUI, but it still is reading and displaying false data when used with 10-byte MSP_STATUS Wii versions
Re: Three independent, stick selectable settings in EEPROM
In my opinion if any protocol have lenght field, we should use it. At PC side the serial buffer should have lenght bigger than longest message, and should be first cleared, then we should read "length" bytes from serial port, then parse data from the read buffer. In this way we always get right data or 0 in missing fields.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Three independent, stick selectable settings in EEPROM
Xbee to my present knowledge and I am sure there are other devices that have a limited buffer size.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Hi,
I found a problem,
with the current stick combo, it is impossible to activate inflight calibration (YAWLEFT+ THROTTLE LOW+ PITCH FORWARD+ROLL RIGHT)
Can you try to fix that?
Maybe put it after inflight acc activation.
Nils
I found a problem,
with the current stick combo, it is impossible to activate inflight calibration (YAWLEFT+ THROTTLE LOW+ PITCH FORWARD+ROLL RIGHT)
Can you try to fix that?
Maybe put it after inflight acc activation.
Nils
Re: Three independent, stick selectable settings in EEPROM
Yes, more specific stick combos must be handled before lesser specific ones.
- Pedro14755
- Posts: 49
- Joined: Tue Jul 14, 2015 12:56 am
- Location: Canberra Australia
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Hi I know that this is a very old post but I am wondering if this can be implemented in 2.4.
I am using an AlienWii flight controller and would love to be able to select three different profiles like what is currently possible in BetaFlight. I can't let those 32bit guys have all the fun
I see that the box marked in the lower right hand side can be adjusted from zero to two - presumably for the three different profiles but the button on the top left will not adjust other than momentarily.
Any details and or help in regard to this would be appreciated Thanks Pedro.
I am using an AlienWii flight controller and would love to be able to select three different profiles like what is currently possible in BetaFlight. I can't let those 32bit guys have all the fun
I see that the box marked in the lower right hand side can be adjusted from zero to two - presumably for the three different profiles but the button on the top left will not adjust other than momentarily.
Any details and or help in regard to this would be appreciated Thanks Pedro.
Re: Three independent, stick selectable settings in EEPROM
It's not active by default In config.h
Just enable and it will work in 2.4.
https://github.com/multiwii/multiwii-fi ... ig.h#L1012
Just enable and it will work in 2.4.
Code: Select all
/************* Support multiple configuration profiles in EEPROM ************/
//#define MULTIPLE_CONFIGURATION_PROFILES
https://github.com/multiwii/multiwii-fi ... ig.h#L1012
- Pedro14755
- Posts: 49
- Joined: Tue Jul 14, 2015 12:56 am
- Location: Canberra Australia
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Thanks for that PatrikE
- Pedro14755
- Posts: 49
- Joined: Tue Jul 14, 2015 12:56 am
- Location: Canberra Australia
- Contact:
Re: Three independent, stick selectable settings in EEPROM
Thanks for that PatrikE. So the only information in the first post of this thread appears to be about accessing stored config settings via stick commands but nothing about how they are actually stored. Would you please be able to elaborate a little so I can have a clearer understanding as I would love to be able to do this
- Pedro14755
- Posts: 49
- Joined: Tue Jul 14, 2015 12:56 am
- Location: Canberra Australia
- Contact:
Re: Three independent, stick selectable settings in EEPROM
So a friend of mine who is delving into some MultiWii development looked into the code and was able to show me how to store and then access these setting. I made these quick videos on how to do it in case anyone in the future wants to implement this feature in MultiWii. I apologise for the video standard but I did the best that I could with what I have available and the information is solid. Thanks again to all those who have contributed to MultiWii and of course to Alex for starting this whole quadcopter revolution. Here are links to the two videos.
https://www.youtube.com/watch?v=r0S81XXpqJs
https://www.youtube.com/watch?v=xBZZM15O5zI
https://www.youtube.com/watch?v=r0S81XXpqJs
https://www.youtube.com/watch?v=xBZZM15O5zI
Re: Three independent, stick selectable settings in EEPROM
Thank for posting that info Pedo. Very helpful.