-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQ] Local input for headless mode #938
Comments
maybe also @drmason789 could be interested on this ;) |
@skoregon you would like to use this running QZ with the -no-gui switch, isn't it? |
@cagnulein Yes, my apologies for leaving that part out. I would like to have a headless pi using -no-gui switch but still accept keyboard (or game controller) input to trigger speed/incline/start/stop events via qdomyos->GPIO on the raspberry pi. |
from linux this should be the solution https://stackoverflow.com/questions/7543313/how-to-handle-keypress-events-in-a-qt-console-application |
@skoregon done, could you please try to pull and build and try? keys: q = speed up |
When I run qmake I get a warning on a json file If I ignore it and move forward with make -j4 I get an error in ConsoleReader.h: No such file or directory (see below). In file included from dirconmanager.h:15, |
sorry @skoregon pull it and build it again, i forgot the case sensitiviness on linux about the file names |
Looks like there might be one more instance hiding somewhere: (see main.cpp:559:54: error: no matching function below) irconprocessor.h: In copy constructor ‘DirconProcessorCharacteristic::DirconProcessorCharacteristic(const DirconProcessorCharacteristic&)’: |
@skoregon Ops sorry, fixed |
@cagnulein It errored out during Make on the following line: :(.text.startup+0x5268): undefined reference to `ConsoleReader::ConsoleReader(bluetooth*)' |
In case more of the error message is needed: |
@skoregon i found an issue on a call but it's not releated to the linker issue. |
@cagnulein I get the same error. I am trying to compile it on a Pi zero W if that matters. See attached for the full log. I am just using "make" not "make -j4". I am running the Lite version of the OS. Are there other changes I need to make to get it to compile on a pi zero? pi@raspberrypi:~/qdomyos-zwift/src $ cat /etc/os-release pi@raspberrypi:~/qdomyos-zwift/src $ cat /sys/firmware/devicetree/base/model |
is it Ok to ignore this WARNING ? |
yes it's safe, i'm checking the log |
I guess I fixed it now. make clean Let me know and sorry for the issues @shoulih |
still getting this WARMING: WARNING: Failure to find: qdomyos-zwift_metatypes.json root@DietPi:~/qdomyos-zwift# git status where is file "qdomyos-zwift_metatypes.json" located? |
@shoulih yes the warning is ok. is it building now? |
@cagnulein Sadly still errors out.
|
@skoregon pull it again and build it, i fixed the segmentation fault and now it should works ok with the -no-gui selector |
@cagnulein I have successfully compiled the software and it runs with sudo ./qdomyos-zwift -no-gui -gpiotreadmill and responds in the console to the key presses. It works very well! Thank you for sticking with it. Is there a way with the keyboard input to still have it load at boot automatically? The procedure in the md file has it running as a background service so it appears not to be able to intercept keyboard commands. https://github.com/cagnulein/qdomyos-zwift/blob/master/docs/10_Installation.md Also, is there a way to change the expected keys for each function (increase speed) without recompiling? I would like to assign it to numbers or arrow keys so I can using a 10 key pad or even just an arrow pad attached to USB. |
Great!
The background service can't work because in order to "feel" the keyboard, the process MUST running on the current shell. One workaround could be:
not yet, which would be your perfect setup? I mean do you need also the key for a target speed (for example 3 for 3km/h and so on?)? and what about the inclination? |
For some reason, I am still getting "Segmentation fault" with -no-gui selector after the latest pull and built from your latest commits or check-ins. Do I miss anything else? |
@shoulih are you sure you're on the last commit? show me a |
@cagnulein here is the git log: |
@shoulih Got the issue, you're not in the gpio-treadmill branch ;) |
Got it; are you merging this branch fix to master? Thanks Robert for your quick reply! |
Yes @shoulih |
Thanks again and good night! |
done @shoulih |
Thanks Robert and it works now! it seems that the no gui mode will be good for running on Pi zero; is there an easy way to configure the QZ settings while running on no gui mode? |
@shoulih Which settings do you need? We should need a switch on command line for each setting. So let's start with the one that you need :) |
@shoulih Also I guess you can edit the setting file by an editor |
that is what I need and can you please share the location of the setting file? BTW, I don't need x11 for running QZ on no gui mode, right? |
@shoulih Mine is under /root/.config/Roberto\ Viola/ |
@shoulih No you don't need x11 :) |
found it
found it! |
Great and that will make Pi zero a super hero! :-) |
** > The background service can't work because in order to "feel" the keyboard, the process MUST running on the current shell. One workaround could be:
Thank you, I will try these steps.
> not yet, which would be your perfect setup? I mean do you need also the key for a target speed (for example 3 for 3km/h and so on?)? and what about the inclination? I have a 6 key keyboard. By default it is organized I think ideally I would be able to assign it as follows: I run in -miles so I suppose that makes that setting a bit difficult if it just counts clicks. |
done @skoregon ;) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@skoregon did you try this? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@skoregon I'm closing this one. If you have issues, feel free to open it back |
Is your feature request related to a problem? Please describe.
I'd like to be able to provide input for speed/incline/stop/start status to my headless pi directly controlling the treadmill.
Describe the solution you'd like
I'd like for the headless mode to accept input from an attached usb keyboard, ideally via a config file to set the keys and the corresponding action (a=incline up). More sophisticated options such a bluetooth input or game controller input would work as well and would be wireless, but are not required.
Describe alternatives you've considered
Currently use GUI pulled up via VNC on a laptop next to treadmill. It works but having a treadmill next to a laptop is not ideal.
Additional context
I appreciate all the effort you put into this project!
This is connected with the headless pi controller for treadmills thread.
#525
The text was updated successfully, but these errors were encountered: