Board index FlightGear Support Hardware

Maximizing Trackball Buttons

Joysticks, pedals, monitors.

Re: Maximizing Trackball Buttons

Postby polly » Mon Jun 05, 2023 4:05 pm

Compiling flightgear for yourself may be the way to go; it's a pain at first to yum/dnf download the needed packages from your repo together with their -devel partners. The download and compile script may help with that for you.

There are a couple of compile options:
Code: Select all
 -DENABLE_HID_INPUT=ON
 -DEVENT_INPUT=ON


That look to be automatically enabled in the builds that I have done, the HID_INPUT option requires downloading the libudev-devel library, detailed post here:

https://forum.flightgear.org/viewtopic.php?f=24&t=32750&p=412373&hilit=two+mice#p318213

Wat I'm saying is, possibly the Appimage doesn't enable these options ( I can't find build details of its build ) , maybe the Appimage is a minimal build without support for HID / Events.

If you're getting crashes with a plain system, just one or two USB Mouse connections, no fancy trackball, no graphics tablet ( ref your flightgear logs ?? ) or drivers then the crashes might be saying you're missing some components that would be present in a compiled program.

In case the download-n-compile script doesn't automatically install libs, these are the names of most the libs I need afterinstalling Fedora:

Code: Select all
openal-soft openal-soft-devel boost boost-devel freealut freealut-devel
fltk fltk-devel OpenSceneGraph OpenSceneGraph-devel freeglut freeglut-devel
subversion subversion-devel joystick-support
plib plib-devel curl curl-devel
User avatar
polly
 
Posts: 969
Joined: Thu Nov 04, 2010 3:45 pm

Re: Maximizing Trackball Buttons

Postby wkitty42 » Tue Jun 06, 2023 5:11 pm

polly wrote in Mon Jun 05, 2023 4:05 pm:The download and compile script may help with that for you.

it does... you can build a fresh system with only a debian-based OS on it... either clone the fgmeta repository (recommended) to run the dnc script from or just download the raw script manually... either way, once you have the script and run it, it will set up everything needed for a proper build environment, clone in the necessary repos, and build all the necessary parts to finally end up with a working FG installation on that system in that user's home directory...

FWIW: dnc can, if instructed, clone the cmake repo and build the latest cmake if your system's cmake is old... it can also clone and build OSG if your system's OSG is old... dnc works great and takes a lot of the pain out of the process... one done, one only need to settle on a set of options to always use and script dnc being called with them... then, if you are like myself, you only need to remember one script name to always have FG built with the same options every time ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Maximizing Trackball Buttons

Postby innactpro » Wed Jun 07, 2023 12:43 am

Here we go.

After reviewing all information provided by polly and wkitty42, and several attempts, this seemed to work:
Code: Select all
download_and_compile.sh --lts -j7 --fg-cmake-arg=-DEVENT_INPUT=ON

--lts because getting bloody is not my intention at the moment, -j7 because 7 is slightly fewer than my only 8 cores, and --fg-cmake-arg=-DEVENT_INPUT=ON because getting an xml file to work in /Input/Event is the current goal. My luck though, -DEVENT_INPUT=ON most likely has nothing to do with /Input/Event.

Anyway, the only ways to get FG to run is by double clicking fgfs or run_fgfs.sh, or in terminal as root. Using sudo just tells me neither are a command. And as root, only when --launcher is included. However, when clicking fly in launcher, launcher closes and FG does not launch:
Code: Select all
    0.01 [WARN]:gui        QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Now checking for plug-in osgPlugins-3.6.5/osgdb_nvtt.so
   24.41 [WARN]:general    Enabling ATI/AMD viewport hack
dbus[67768]: arguments to dbus_connection_set_exit_on_disconnect() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 3149.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)
This also is the result when not including --launcher.

Double clicking fgfs or run_fgfs.sh opens FG without launcher and does not download or use scenery and drops the 172 into the ocean.

Again, so much of this has to do with my ignorance, for certain, but this is where FG stands on my computer for the moment.
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby MariuszXC » Wed Jun 07, 2023 9:03 am

One of my computers is running exactly the same Ubuntu version you have.
I am able to start FG from terminal as a normal user without any issues, just by typing ./run_fgfs.sh --option1 --option2 ...

Clicking on bash scripts rarely brings satisfying results ;-)

I do not use a launcher, although I have it compiled in.

Please review your build process. Did you, perchance, run it as root? It is not necessary...
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: Maximizing Trackball Buttons

Postby innactpro » Wed Jun 07, 2023 12:14 pm

DNC was not run as root, and there is nothing exotic about my system. It was just a basic Ubuntu install.

My mistake may though have been found. The full path was not included in the terminal. Including the full path to run_fgfs.sh --launcher seems to be working as expected. Downloading scenery and everything.

Next to test the /Input/Event xml situation.

Except now it is stuck at downloading scenery, without any scenery being downloaded.

Though a quick chown seems to have remedied the scenery download stall.
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby innactpro » Wed Jun 07, 2023 3:25 pm

FG is now working as expected without the fatal exception with the MouseExtra.xml in the /Input/Event folder. However the MouseExtra.xml isn't having any effect. Both mouse and trackball do the same things.
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby polly » Wed Jun 07, 2023 4:38 pm

You said earlier you have a second USB mouse, put the product name of that mouse in the MouseExtra event file and start flightgear with two standard mice, use the c172 and either press 'h' to view the heads up display or select an outside view.
I've confirmed that with the event file linked above, from the wiki page or the forum thread
the second mouse ( event driven ) controls ailerons and elevator while the first mouse does the usual cycling through modes. Your result should either isolate the flightgear setup or issues with the trackball. Look in your fgfs.log for things related to 'HID' and 'Event'
I wish you'd confirm if you have a graphics tablet connected, it's very frustrating having to make guesses.
User avatar
polly
 
Posts: 969
Joined: Thu Nov 04, 2010 3:45 pm

Re: Maximizing Trackball Buttons

Postby innactpro » Wed Jun 07, 2023 5:40 pm

polly wrote in Wed Jun 07, 2023 4:38 pm:put the product name of that mouse in the MouseExtra event file and start flightgear with two standard mice
The product name has been in the MouseExtra.xml since connecting the extra mouse.

polly wrote in Wed Jun 07, 2023 4:38 pm:I wish you'd confirm if you have a graphics tablet connected, it's very frustrating having to make guesses.
The graphics tablet was mentioned early in this thread. The tablet actually appears in the joystick configuration.

From fgfs.log:
Code: Select all
  130.21 [INFO]:input     /media/jason/Data/FlightGear/dnc-managed/flightgear/src/Input/FGHIDEventInput.cxx:929: HID event input starting up
  920.53 [INFO]:input     /media/jason/Data/FlightGear/dnc-managed/flightgear/src/Input/FGHIDEventInput.cxx:944: HID event input shutting down
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby polly » Wed Jun 07, 2023 6:11 pm

Look,
Just two posts ago : " Both mouse and trackball do the same things."
and now: " since connecting the extra mouse."

And I know the tablet "was mentioned" but I said, get rid of it, in other words you should work stepwise: work to get a simple system operating as expected and move in steps towards to setup you want. i.e. Two devices, each a standard USB mouse with the event file that everyone else says works OK.

0) Put aside trackball, graphics tablet, uninstall any drivers for same

1) _____One____ input device, a USB mouse, no event file verify fgfs works and mouse cycles modes as documented .

2) Add a secind ______USB Mouse _____ not a tablet, not a trackball . Put the second mouse's product name into the event file from wiki/"Two Mice" thread and install just that in flightgear

3) First mouse should work as before, second mouse should operate ailerons / elevators , that's what everybody else sees.
User avatar
polly
 
Posts: 969
Joined: Thu Nov 04, 2010 3:45 pm

Re: Maximizing Trackball Buttons

Postby innactpro » Thu Jun 08, 2023 3:32 am

First, operator error; the xml was in /Input. Moving it to /Input/Event brings back the fatal exception.

Second:
polly wrote in Wed Jun 07, 2023 6:11 pm:Look,
Just two posts ago : " Both mouse and trackball do the same things."
and now: " since connecting the extra mouse."

And I know the tablet "was mentioned" but I said, get rid of it, in other words you should work stepwise: work to get a simple system operating as expected and move in steps towards to setup you want. i.e. Two devices, each a standard USB mouse with the event file that everyone else says works OK.

0) Put aside trackball, graphics tablet, uninstall any drivers for same

1) _____One____ input device, a USB mouse, no event file verify fgfs works and mouse cycles modes as documented .

2) Add a secind ______USB Mouse _____ not a tablet, not a trackball . Put the second mouse's product name into the event file from wiki/"Two Mice" thread and install just that in flightgear

3) First mouse should work as before, second mouse should operate ailerons / elevators , that's what everybody else sees.
One basic usb mouse, and FG works as expected. Two basic usb mice, and FG works as expected. Two basic usb mice with the xml, and still a fatal exception. Disconnecting the trackball and the tablet and using two basic usb mice had no effect. The trackball is not fancy nor does it have drivers. To the system it is a pointing input device and has no idea that a trackball surface is being moved over sensors, rather than sensors in a mouse being moved over a surface. The tablet also has no drivers other than Wayland which is preinstalled anyway.

Finally, help is appreciated, but if you are that frustrated, you are under no obligation.

You're in a desert, walking along in the sand, when all of a sudden you look down...
What one?
What?
What desert?
It doesn't make any difference what desert, it's completely hypothetical.
But, how come I'd be there?
Maybe you're fed up. Maybe you want to be by yourself. Who knows? You look down and see a tortoise, Leon. It's crawling toward you...
Tortoise? What's that?
You know what a turtle is?
Of course.
Same thing.
I've never seen a turtle. But I understand what you mean.
You reach down and you flip the tortoise over on its back, Leon.
Do you make up these questions, Mr. Holden? Or do they write 'em down for you?
The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can't. Not without your help. But you're not helping.
What do you mean, I'm not helping?
I mean, you're not helping. Why is that, Leon?
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby wkitty42 » Thu Jun 08, 2023 11:07 am

OT: +1000 for the Blade Runner quote! :lol:
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Maximizing Trackball Buttons

Postby innactpro » Thu Jun 08, 2023 12:51 pm

wkitty42 wrote in Thu Jun 08, 2023 11:07 am:OT: +1000 for the Blade Runner quote! :lol:
It was quoted previously, less than accurately.

In a possibly related situation, my ssd has 30 missing gigabytes which disappeared at the same time as trying to troubleshoot this fatal exception problem. And what is meant by missing; disk usage shows 7.8 GB available of 58.6, though shows only 20.3 GB of 255310 items, leaving 30.5 GB unaccounted for. Maybe a fresh reinstall of Ubuntu will be helpful. Though today and tomorrow are busy days and it may be the weekend before doing that.

Though it does seem clear that there is something with my system causing this. As polly stated, no one else seems to be having this problem. Nothing like it comes up in a search of the forum, nor the rest of the internet even.

The touch screen maybe? Though that doesn't seem likely either.
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby innactpro » Fri Jun 09, 2023 3:13 am

There was time to do a fresh Ubuntu install, and before doing anything else, the xml in the event folder with the mouse name again caused the fatal exception. And running FG was the first thing after the reinstall.

One thing that is different is the xinput list no longer includes input devices from before the reinstall. Everything in the list is xwayland-<something>.

Could wayland be the problem, or at least contributing? There are multiple discussion about wayland on this forum, though most of that seems to concern graphics.

MariuszXC is running the same Ubuntu version on a computer and doesn't seem to have any problems running FG. And really the only problem for me is getting MouseExtra.xml to work. Everything else is fine.
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby innactpro » Fri Jun 09, 2023 3:38 am

Except restarting in xorg didn't change anything. Still the fatal exception.

Man, the thought of a second mouse was a bit exciting, and that maybe an event xml could have made use of the extra buttons. Perhaps it's time to throw in the proverbial towel?
User avatar
innactpro
 
Posts: 54
Joined: Fri May 19, 2023 2:27 pm
Version: 2020.3.18
OS: Ubuntu 22.04 LTS

Re: Maximizing Trackball Buttons

Postby MariuszXC » Fri Jun 09, 2023 4:48 pm

innactpro wrote in Thu Jun 08, 2023 12:51 pm:my ssd has 30 missing gigabytes which disappeared at the same time as trying to troubleshoot this fatal exception problem. And what is meant by missing; disk usage shows 7.8 GB available of 58.6, though shows only 20.3 GB of 255310 items, leaving 30.5 GB unaccounted for...


$ man fstrim
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 7 guests