Page 1 of 1
[Patch] MultiwiiConf fails to compile with current controlP5
Posted: Mon Apr 16, 2012 8:18 am
by Tommie
I tried compiling MultiwiiConf with controlP5 0.7.2, which however fails with the following message:
"The method hideLabel(Controller) in the type MultiWiiConf is not applicable for the arguments (Checkbox)"
I tracked it down to the lines 223ff:
Code: Select all
...
hideLabel(checkbox1[i].addItem(i + "1",1));hideLabel(checkbox1[i].addItem(i + "2",2));hideLabel(checkbox1[i].addItem(i + "3",3));
hideLabel(checkbox1[i].addItem(i + "4",4));hideLabel(checkbox1[i].addItem(i + "5",5));hideLabel(checkbox1[i].addItem(i + "6",6));
...
The .addItem method of the CheckBox class does not return an object derived from the Control class; it returns the checkbox, which is a control group.
This is due to this change in controlP5:
https://code.google.com/p/controlp5/sou ... ckBox.javaI uploaded a patch that also cleans up the checkbox creation here:
https://github.com/wertarbyte/multiwii- ... _hidelabel
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Apr 20, 2012 12:03 pm
by Tommie
Am I the only one experiencing this problem? Any kind of feedback is greatly appreciated.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Apr 20, 2012 3:34 pm
by copterrichie
I had the same problem but I reverted back to a previous verse of Processing and ControlP for the time being.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Apr 20, 2012 3:40 pm
by Tommie
copterrichie wrote:I had the same problem but I reverted back to a previous verse of Processing and ControlP for the time being.
Would you mind checking my patch? It applies to the current version of MultiwiiConfGUI and works fine for me
Thanks in advance.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Apr 20, 2012 4:06 pm
by copterrichie
I will as soon as I return today.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sat Apr 21, 2012 10:33 am
by KeesvR
I've seen this and used your patch, I get a warning under in the processing screen when the Gui starts.
RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sat Apr 21, 2012 10:59 am
by Tommie
That's not related to the patch, I am getting this warning since day one, even with the old version of the file. It's working though.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sat Apr 21, 2012 1:50 pm
by copterrichie
Just wanted to let you know, I was able to compile your patch version, appears to work great. Sorry I don't have a GPS device connected but everything else is working.
Thanks.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sat Apr 21, 2012 5:08 pm
by Tifani
Hi !
After applying your patch I was able to compile - will test afternoon if I finish soldering new controller.
I run Windows 7 -64bit but only 32bit version works (the same for original MultiWiiConf)
Thanks
Tom
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sat Apr 21, 2012 10:07 pm
by Hamburger
is the patch backwards compatible, i.e. does it work with the older controlP5 version as well?
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sun Apr 22, 2012 1:30 pm
by Tommie
I don't have an earlier version installed, but since the patch is just a few lines long, someone using an older controlP5 can probably test it easily.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sun Apr 22, 2012 1:53 pm
by copterrichie
I just tried compiling the Patch with Processing 1.5.1 and it will not compile.
Error message: "This Function hideLabels() does not exist."
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sun Apr 22, 2012 2:05 pm
by Hamburger
Ok. This is serrious.
We have an incompatiblity issue to deal with in the future from now on till forever.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sun Apr 22, 2012 2:35 pm
by Tommie
Why not simply require the newer version of controlP5 at some point in the future?
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sun Apr 22, 2012 4:24 pm
by Alexinparis
Hi,
I tried the latest version of ControlP5. There is the incompatibility you mentioned. We could handle this by upgrading everything to the last solution, not a problem.
But there is one point I'm not happy with:
The Numberbox is the new version has now a small triangle inside and the text value is not aligned as before.
It's not a good point if we want to optimize GUI space. I would like to keep Numberbox items thanks to their scrolling ability.
I didn't manage to remove the triangles via object attributes, so until a better solution I will stay with former versions.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Mon Apr 23, 2012 9:23 am
by Hamburger
Tommie wrote:Why not simply require the newer version of controlP5 at some point in the future?
sure, we could do that, but it is not to the point I was poking at. Whichever one of the two options we choose, we will be faced with error/support requests from people with the other s/w version and non-compilable GUI code.
About the upgrade, Alex has made his point. Fine with me.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Mon Apr 23, 2012 2:43 pm
by copterrichie
IMO, most people don't bother compiling their own version of the GUI, so it is really a non issue in my opinion.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Tue May 15, 2012 10:36 am
by Katch
Just thought I'd post and say I ran into this problem today - I was only a few google searches away from submitting an error/support request when I found this post. Tommie's patch sorted it for me.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Sat Jun 02, 2012 12:55 am
by LenzGr
FWIW, all the sudden this happens to me as well, after pulling the latest trunk (running ControlP5 version 0.6.12): "The function hideLabels() does not exist"
This is the offending line:
Do I need to upgrade the library in order to build the GUI?
Update: Yes, updating to the latest version of ControlP5 (0.7.5) fixed the compile error.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Jun 08, 2012 2:21 pm
by Hamburger
Alexinparis wrote:Hi,
I tried the latest version of ControlP5. There is the incompatibility you mentioned. We could handle this by upgrading everything to the last solution, not a problem.
[...]
I didn't manage to remove the triangles via object attributes, so until a better solution I will stay with former versions.
so we have (been) moved to the newer ControlP5 library. I hope we do not receive too many requests for support on older versions of the GUI.
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Jun 08, 2012 2:32 pm
by fiendie
Hamburger wrote:so we have (been) moved to the newer ControlP5 library. I hope we do not receive too many requests for support on older versions of the GUI.
Do you run a call center?
Just document it somewhere and be done with it.
It's an open source project. Try getting support from one of the Linux Kernel devs
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Jun 08, 2012 7:39 pm
by kos
the mwi-gui-component / ControlP5 fork used by multiwii can be found here ->
https://github.com/treymarc/mwi-gui-com ... ster/build
Re: [Patch] MultiwiiConf fails to compile with current contr
Posted: Fri Jun 29, 2012 11:22 pm
by hdias
I had the same problem and solved it with the following code (I hope that this code is right...):
MultiWiiConf_2_0
Processing-1.5.1
controlP5-0.7.5
Code: Select all
// hideLabel(checkbox1[i].addItem(i + "1",1));hideLabel(checkbox1[i].addItem(i + "2",2));hideLabel(checkbox1[i].addItem(i + "3",3));
// hideLabel(checkbox1[i].addItem(i + "4",4));hideLabel(checkbox1[i].addItem(i + "5",5));hideLabel(checkbox1[i].addItem(i + "6",6));
checkbox1[i].addItem(i + "1",1);
checkbox1[i].addItem(i + "2",2);
checkbox1[i].addItem(i + "3",3);
checkbox1[i].addItem(i + "4",4);
checkbox1[i].addItem(i + "5",5);
checkbox1[i].addItem(i + "6",6);
checkbox1[i].hideLabels();
checkbox2[i] = controlP5.addCheckBox("cb_"+i,xBox+170,yBox+20+13*i);
checkbox2[i].setColorActive(color(255));checkbox2[i].setColorBackground(color(120));
checkbox2[i].setItemsPerRow(6);checkbox2[i].setSpacingColumn(10);
checkbox2[i].setLabel("");
// hideLabel(checkbox2[i].addItem(i + "1_",1));hideLabel(checkbox2[i].addItem(i + "2_",2));hideLabel(checkbox2[i].addItem(i + "3_",3));
// hideLabel(checkbox2[i].addItem(i + "4_",4));hideLabel(checkbox2[i].addItem(i + "5_",5));hideLabel(checkbox2[i].addItem(i + "6_",6));
checkbox2[i].addItem(i + "1_",1);
checkbox2[i].addItem(i + "2_",2);
checkbox2[i].addItem(i + "3_",3);
checkbox2[i].addItem(i + "4_",4);
checkbox2[i].addItem(i + "5_",5);
checkbox2[i].addItem(i + "6_",6);
checkbox2[i].hideLabels();