Page 1 of 3

MwGui - Another Gui

Posted: Mon Jun 04, 2012 8:12 am
by kos
hello,

Had some free time this weekend , so i just start a new gui,

works with the latest serial protocol and dev version

sources & install instruction : https://github.com/treymarc/mwi-swing

build : https://github.com/treymarc/mwi-swing/tree/master/build

current features :
select port and serial speed
send/read raw serial ( ex : vt100 )
read raw imu
zoom, export and scroll the realtime chart

there is some screenshoots

it may evolve to a full featured ground station .

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 1:37 pm
by kos
Image
Image

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 1:41 pm
by EOSBandi
I really appreciate your work, but do we really need another java gui ?

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 1:55 pm
by LenzGr
As a Linux user, I'm actually in favour of a GUI that works on multiple platforms (and not just windows). So I personally don't mind it :)

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 2:31 pm
by fiendie
EOSBandi wrote:I really appreciate your work, but do we really need another java gui ?

We need a proper Java GUI. Processing doesn't count ;)
I support the idea of a Swing GUI.

@kos: I already took it for a spin. Works fine so far under Mac OS X.
Can't you just add rxtx as a Maven dependency? If I saw that correctly that's the only lib you're using from the exported Processing app anyway isn't it?
I'll try to contribute if I can find some time over the weekend ;)

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 2:34 pm
by copterrichie
A pure Java application without the Processing is very easy to port to other platforms.

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 2:45 pm
by kos
copterrichie wrote:A pure Java application without the Processing is very easy to port to other platforms.


it is pure java ;)

It is now confirmed that it run fine on Windows, Linux and MacOS

@fiendie : https://github.com/treymarc/mwi-swing/t ... repository

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 2:50 pm
by kos
fiendie wrote:I'll try to contribute if I can find some time over the weekend ;)

8-)

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 4:53 pm
by mahowik
copterrichie wrote:A pure Java application without the Processing is very easy to port to other platforms.

do you know will it be possible to port for android? it would be nice to have this on tab! ;)

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 4:55 pm
by copterrichie
mahowik wrote:
copterrichie wrote:A pure Java application without the Processing is very easy to port to other platforms.

do you know will it be possible to port for android? it would be nice to have this on tab! ;)


I personally have not worked with an android but I hear it is fully Java complaint. So it should work without any modifications.

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 6:26 pm
by Dehas
I just try it on dev and it works perfectly.
(Vas y mon grand, développe le)

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 9:29 pm
by kos
the threading issue is now solved , was my fault, sorry :oops:

you can get the latest snapshot : https://github.com/treymarc/mwi-swing/tree/master/build

for Android,Blackerry (both are java based and come with BT) , we can use the same multiwii serial protocol decoder/encoder , but the ui has the be rewritten... also i am producing low quality "no framework" chilling at home code , it is not very usable as is :D

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 9:50 pm
by Alexinparis
Hi,

You know, I choose processing because it looked very easy to understand.
If you want to improve the current gui with swing or other "modern" components, there is no problem.

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 10:55 pm
by LenzGr
It's probably difficult to port the existing Processing code to native Java - there is a reason why it's so much easier to learn and understand in comparison to the "real" thing :)
But it would of course be excellent if as much of the existing code/algorithms could be preserved/reused. But I certainly don't complain - the actual existence of a GUI that (somehow) works on Linux was what actually attracted me to the MultiWii project to begin with.

Re: MwGui - Another Gui

Posted: Mon Jun 04, 2012 11:07 pm
by copterrichie
LenzGr wrote:It's probably difficult to port the existing Processing code to native Java - there is a reason why it's so much easier to learn and understand in comparison to the "real" thing :)
But it would of course be excellent if as much of the existing code/algorithms could be preserved/reused. But I certainly don't complain - the actual existence of a GUI that (somehow) works on Linux was what actually attracted me to the MultiWii project to begin with.


Amen! I really appreciate what we have but there is always room for growth.

Re: MwGui - Another Gui

Posted: Tue Jun 05, 2012 3:14 am
by kos
version 0.0.1a is out ,

You can adjust the baud rate and the refresh rate

It should work with Bluetooth

You can adjust the window size

It should blend with the Mac Os look and feel

Re: MwGui - Another Gui

Posted: Tue Jun 05, 2012 10:44 am
by Hamburger
LenzGr wrote:As a Linux user, I'm actually in favour of a GUI that works on multiple platforms (and not just windows). So I personally don't mind it :)

+1 I will not follow a windows-only route.

In the long run I would expect one of the two Processing vs. Swing GUIs to evolve as the official leading GUI.

Re: MwGui - Another Gui

Posted: Tue Jun 05, 2012 11:41 pm
by kos
Features request are now open, what should come in the next release is :

- adjusting PID settings
- save/load PID settings
- save/replay all sensors log
- add attitude panel
- add altitude panel
- add motors / servo panel - completed

you can also start participating on github

Re: MwGui - Another Gui

Posted: Fri Jun 08, 2012 8:07 am
by kos
you can rescan/close/reopen.. and hard disconnect the serial port . the gui will now handle the work

i started to work on the layout .. will be tabs and menu , see the screenshots in the first post .

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 9:58 am
by kos
all gui items are build using the latest serial mod (with optional box and pid name) :)
all items have tooltips
still work in progress


Image

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 6:29 pm
by kos
you can now do the calibration from the gui

MwGui only works with the latest serial protocol (from shared , starting from 2012/06/09)

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 8:17 pm
by jessestr
What OS do you run & GUI? Gnome, KDE, openbox,..?

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 9:14 pm
by LenzGr
I tried to test this new GUI tonight and finally managed to get it to build (using Ubuntu Lucid on x86). The GUI starts up fine and I can select my USB serial port /dev/ttyUSB0). I also see there is serial activity, but the GUI does not display anything - no graphs and reading out the configuration does not work either.

I am currently running the latest MultiWii development version from trunk. Could this be the reason? Let me know what info you need to investigate this.

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 9:33 pm
by Pyrofer
Loving the new GUI, lots of potential!

Runs and works fine, probably easier and quicker than the processing engine GUI :)

Looking forward to the progress on this.

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 9:34 pm
by kos
LenzGr wrote:I am currently running the latest MultiWii development version from trunk. Could this be the reason? Let me know what info you need to investigate this.


the latest from multiwii_shared :)

http://code.google.com/p/multiwii/sourc ... Wii_shared

:)

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 9:54 pm
by LenzGr
kos wrote:the latest from multiwii_shared :)

Not sure I understand - does the serial protocol in _shared differ from the one currently used in the development trunk? In that case I'll wait for Alex to merge these changes. Thanks!

Re: MwGui - Another Gui

Posted: Sun Jun 10, 2012 10:01 pm
by kos
the serial protocol in Mwgui is the latest from shared , the one the is currently discussed and not merged into Alex branche.

details : viewtopic.php?f=8&t=1516&start=170#p16030

the point of using the latest bleeding serial protocol proposal is : if we can have a gui that work ok with the new serial, we can circumvent the current gui lag and release 2.1 in time .

Re: MwGui - Another Gui

Posted: Fri Jun 15, 2012 9:01 am
by Pyrofer
Just had this brought to my attention,
http://diydrones.com/profiles/blogs/gui ... man-filter
It shows a java app for drawing a nice artificial horizon. :)

Its open source so maybe something we could integrate with the new MwGUI?

Re: MwGui - Another Gui

Posted: Fri Jun 15, 2012 8:13 pm
by kos
Image

Re: MwGui - Another Gui

Posted: Fri Jun 15, 2012 8:20 pm
by copterrichie
Wow!

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 3:51 am
by kos
Image

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 12:09 pm
by Pyrofer
K-os, congrats!!

Some great progress. This is going to be my GUI of choice from now on! Love the Artificial Horizon :) Wonder where you got that idea :p

It looks so much better than *cough* some other options already :)

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 12:37 pm
by Pyrofer
Minor bug-ettes...

The Artificial Horizon appears to be backwards on my quad? Pitch forward shows the Horizon pitching back, roll left shows it roll right etc.
Also, the PID items don't appear for me. I get the word PID to the left of the checkbox items.

I am running Tommies FW from about a week ago, will update and see what changes.
Newer FW fixes the PID issue, still something funny with Artificial Horizon.

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 7:54 pm
by kos
thanks for testing ;)

Pyrofer wrote:I am running Tommies FW from about a week ago, will update and see what changes.
Newer FW fixes the PID issue, still something funny with Artificial Horizon.


yes, ;)


ps : I have stop uploading the lastest _shared firmaware as it changes to often ...

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 8:01 pm
by fiendie
@kos: The artificial horizon looks pretty sweet. Unfortunately one of the later versions breaks reading the serial ports on Mac OS X.
Also you force the Nimbus Look&Feel on Mac users ;)
I suggest handling it this way: https://github.com/fiendie/mwi-swing/co ... 2b9a5fe258

Cheers
Andy

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 8:35 pm
by kos
merged :)

Re: MwGui - Another Gui

Posted: Sat Jun 16, 2012 10:28 pm
by Pyrofer
again, nice work :)

can we have the debug boxes?
I was checking my ram usage and had to swap back to the 'other' gui to do so :p

How are you planning to do the expo curves etc?
Thanks again for this lovely work :)

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 1:59 am
by kos
Pyrofer wrote:can we have the debug boxes?


done :)

Pyrofer wrote:How are you planning to do the expo curves etc?


any suggestion is welcomed , i was thinking of something similare to the current gui , to me : the real curve visual display is required

pending tasks:
- fix the roll display in the hud
- save to eeprom

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 2:58 am
by kataventos
Hi, no <fixperm.sh>!? I can not run it in my Mac.

Cheers,
H

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 3:45 am
by kos
if you build from source and if your are not using the same folder than multiwiiConf .. then you have to set up your mac for RXTX

http://jlog.org/rxtx-mac.html

---

the easy way is download and add the file in the folder multiwiiConf

https://github.com/treymarc/mwi-swing#run

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 4:22 am
by kataventos
Thanks 8-)

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 4:43 am
by kos
you can now change the line color
the hud is also fixed

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 11:32 am
by Pyrofer
Couple of suggestions :) (get used to it, its all I have right now!)
Disable the buttons such as "start, stop" when it's not connected to a serial port as that seems to lock up the app if you press them.
Can you have a default set of PID and checkboxes show on startup rather than the blank page? Would look nicer.
These are simply cosmetic changes so feel free to ignore :)

Thanks again on the speedy development here!

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 12:08 pm
by kos
Pyrofer wrote:Disable the buttons such as "start, stop" when it's not connected to a serial port as that seems to lock up the app


this is a deffect , you should see a pop-up that list the available serial ports ..

your are windows, unix, macos ?

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 12:10 pm
by fiendie
@kos, @kataventos: I added an ant build script to export a Mac OS X app bundle: https://github.com/fiendie/mwi-swing/commit/8d23fe2d8788fbbdbfe050e5212f3749e088d377

You need to have the JarBundler ant task installed:

Code: Select all

sudo port install jarbundler

After that just run

Code: Select all

ant bundle
in the project‘s root directory.
The app bundle is being copied to the release directory.

The script assumes that you have librxtxSerial.jnilib and RXTXcomm.jar in build/lib.

Cheers
Andy

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 12:26 pm
by Pyrofer
Using windows 7 64bit.

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 1:05 pm
by kos
Pyrofer wrote:Using windows 7 64bit.


ok, thanks .. i think i spot the issue , will be solved very soon ;)

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 1:08 pm
by kos
fiendie wrote:@kos, @kataventos: I added an ant build script to export a Mac OS X app bundle: https://github.com/fiendie/mwi-swing/commit/8d23fe2d8788fbbdbfe050e5212f3749e088d377


The script assumes that you have librxtxSerial.jnilib and RXTXcomm.jar in build/lib.


will not be merge yet , i will change the directory layout to include maven modules for extra step (mac bundle , jnlp , etc .. ) so prepare another pom for that :)

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 1:21 pm
by fiendie
kos wrote:will not be merge yet , i will change the directory layout to include maven modules for extra step (mac bundle , jnlp , etc .. ) so prepare another pom for that :)

No rush ;)
There actually is a Maven plugin, too.
I will test that.

By the way, reading serial ports on Mac OS X is still broken. I've not yet looked at the changes. Do you know what could be causing it?

Re: MwGui - Another Gui

Posted: Sun Jun 17, 2012 4:51 pm
by kos
Pyrofer wrote:Using windows 7 64bit.


you should have a popup

Image

fix hud display ( still wrong when upside down)
add roll/pitch angle (x/y)