New GUI for embedded systems

More
8 years 1 month ago #117665 by Grotius
Hi Travis,

It starts.

I did a git clone, compiled the code and make a Xmotion directory, copied the config.ini file :

mkdir /etc/Xmotion and then
cp config_example.ini /etc/Xmotion/config.ini

To start the application :

I did keyboard function : Cntr + Alt + F1.
Then i got a kind of TTY1 terminal and typed : cd xmotion (my git clone was called xmotion)
Then i did : ./launch
It started up.

To close the terminal i did Cntr + Alt + F7.


After reboot i copied this :
Code:
[system] mouse_device=/dev/input/mice keyboard_device=/dev/input/event0 [motion] max_jog_speed=600 default_jog_speed=600
into the top of the file /etc/Xmotion/config.ini

This was not enough to make the keyboard and mouse working. I looked for mice. But that is a good choice.

Wow. Can you explain how this works? It's completely different from what i am programming for 2 years now.

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago - 8 years 1 month ago #117666 by travis.gillin
Hey Grotius,

Figure out what /dev/input/eventX device is your keyboard and which is your mouse, this will vary from system to system. I'll probably figure out a way to solve this automatically later. Use "cat /dev/input/event[0-watever]" then move mouse/type on keyboard to figure out which is for mouse and which is for the keyboard. Also, I should note that the old way of reading the mouse /dev/input/mice is not compatible, I had to switch to the new event way in order to capture the scroll events.

It works by dealing directly with the framebuffer and input/output devices. It's being developed for use on embedded systems with fairly limited resources, but also compatible with any linux system in general. We also like the idea of getting away from the "Desktopish Looking" CNC control. The idea is that the user will never leave this machine interface and every action that needs to be performed will be available inside this UI.

Once you have the GUI open with keyboard and mouse working, hit Alt-F1 on your keyboard to open a "terminal like" window.

input "kill" followed by enter to kill the GUI
input "sim=true" followed by enter to simulate motion on the DRO and Indicators

See src/utils/terminal.c for a full list of commands. If it's not in the list, the command executes as an MDI.

In about a week I should have the linuxcnc communication sorted out and this UI will be capible of Homing, touching off, jogging, mdi, and auto mode

If you wan't to try and use the linuxcnc functionality that currently exists, take a look at src/linuxcnc.cpp, the basis functionality is currently commented out in the repo so I can develop the gcode viewer without having to launch the RTAPI every iteration.

Thanks,
Travis
Last edit: 8 years 1 month ago by travis.gillin.

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago - 8 years 1 month ago #117672 by Grotius
Hi Travis,

In terminal : cat /dev/input/event[0] or cat /dev/input/event0 works as mouse.
In terminal : cat /dev/input/event[1] or cat /dev/input/event1 works as keyboard.
Nice to know, bot'h statements work, that is new in linux !

I copied this to bot'h of the files,
Code:
[system] mouse_device=/dev/input/event0 keyboard_device=/dev/input/event1 [motion] max_jog_speed=600 default_jog_speed=600
1. /xmotion/config_example.ini (git clone)
2. /etc/Xmotion/config.ini

but after typing ./lauch the mouse and keyboard are not working.

When i type in the TTY terminal : linuxcnc /home/grotius/linuxcnc/configs/sim.axis/axis.ini "enter"
Where in axis.ini the screen is named : Xmotion
I get error : no display name and no display environment variable.

It's being developed for use on embedded systems with fairly limited resources

I am impressed of this new information, even if i have not explored your code yet.
When you have time for a step by step startup readme, i can start your application with mouse and keyboard and look around.
After that i can explore your source code. Keep up the good work !! You are a very smart programmer, but quiet until last week.
Last edit: 8 years 1 month ago by Grotius.

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #117704 by andypugh
It looks like you are trying to run a 2.8 config on a 2.7 LinuxCNC.

So I suspect that you might not have done the . ./scripts/rip-environment thing in the shell you are starting LinuxCNC from..

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #117728 by Grotius
Hi Andy,

I am running a extended 2.8+
I tried to start Travis application with run in place and no run in place.
The most importand issue is a clear readme file. I will wait for that.

The gui is starting, but mouse and keyboard is locked, even when i configured the files following his explenation.

This gui is privat on git. So i have the invitation to test it, maybe as first. It's embedded. It start's in TTY panel.
press for the fun : cntr + alt + F1, if you want to go back press cntr + alt + F7

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #117874 by travis.gillin
Hey Grotius,

I apologize for the lack of information on getting the thing lit up. I'm making progress on it every day. The Gcode viewer is practically finished as of right now.

Try launching the GUI without starting the rtapi. Just run ./Xmotion in the project folder. If the mouse and keyboard devices are set to the correct devices in the ini you should be able to explore the GUI and even open gcode files (set post_directory=/your/post/directory under the [system] section to specify the folder). Be sure to pull and rebuild though, this is all recent additions.

Once the GUI is up and running and in beta, we will make the repo public and make sure the Readme is squared away. We actually already have a customer that is very eager to get there hands on our embedded Gen2 control with this UI on their router table so we have committed to a 3-week timeline for them. This timeline will include full machine control but no CAD/CAM in the GUI. This will take a little longer but I have already worked out the most important details pertaining to integrating JetCad. JetCad is cloud-based, mostly javascript. So I have integrated a Javascript engine into this gui and the JetCad geometry engine seems to be ticking away like a dream after a few hours of tweaking. It's just a matter of switching out HTML DOM manipulation for application specific interactions
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds
Powered by Kunena Forum