MwGui - Another Gui

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

MwGui - Another Gui

Post 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 .

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

Image
Image
Last edited by kos on Mon Jun 18, 2012 10:02 pm, edited 3 times in total.

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

Re: MwGui - Another Gui

Post by EOSBandi »

I really appreciate your work, but do we really need another java gui ?

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: MwGui - Another Gui

Post 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 :)

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: MwGui - Another Gui

Post 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 ;)

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MwGui - Another Gui

Post by copterrichie »

A pure Java application without the Processing is very easy to port to other platforms.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

fiendie wrote:I'll try to contribute if I can find some time over the weekend ;)

8-)

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: MwGui - Another Gui

Post 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! ;)

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MwGui - Another Gui

Post 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.

Dehas
Posts: 14
Joined: Sun Aug 14, 2011 8:19 am
Location: France Les Vosges

Re: MwGui - Another Gui

Post by Dehas »

I just try it on dev and it works perfectly.
(Vas y mon grand, développe le)

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: MwGui - Another Gui

Post 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.

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: MwGui - Another Gui

Post 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.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MwGui - Another Gui

Post 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.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

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

Re: MwGui - Another Gui

Post 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.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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 .

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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)
Last edited by kos on Sun Jun 10, 2012 9:45 pm, edited 1 time in total.

jessestr
Posts: 86
Joined: Tue Dec 27, 2011 8:49 pm

Re: MwGui - Another Gui

Post by jessestr »

What OS do you run & GUI? Gnome, KDE, openbox,..?

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: MwGui - Another Gui

Post 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.

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post 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.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

:)

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: MwGui - Another Gui

Post 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!

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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 .

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post 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?

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

Image
Last edited by kos on Mon Jun 18, 2012 11:26 pm, edited 1 time in total.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MwGui - Another Gui

Post by copterrichie »

Wow!

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

Image
Last edited by kos on Mon Jun 18, 2012 10:02 pm, edited 1 time in total.

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post 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 :)

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post 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.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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 ...

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: MwGui - Another Gui

Post 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

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

merged :)

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post 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 :)

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: MwGui - Another Gui

Post by kataventos »

Hi, no <fixperm.sh>!? I can not run it in my Mac.

Cheers,
H

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: MwGui - Another Gui

Post by kataventos »

Thanks 8-)

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

you can now change the line color
the hud is also fixed
Last edited by kos on Sun Jun 17, 2012 4:56 pm, edited 1 time in total.

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post 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!

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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 ?

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: MwGui - Another Gui

Post 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

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: MwGui - Another Gui

Post by Pyrofer »

Using windows 7 64bit.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post by kos »

Pyrofer wrote:Using windows 7 64bit.


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

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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 :)

fiendie
Posts: 151
Joined: Fri Apr 20, 2012 4:22 pm

Re: MwGui - Another Gui

Post 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?

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: MwGui - Another Gui

Post 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)

Post Reply