EinEinfach / CaSSAndRA

Cascaded sunray server and rover application
MIT License
29 stars 17 forks source link

Joystick ball not at mouse/touch position if using Dockerfile #121

Closed greymfm closed 6 months ago

greymfm commented 6 months ago

I'm trying out lastest code (Github master with provided docker), and it seems the Joystick ball is never at the mouse/touch position (same on all Ubuntu web browsers and Android phone web browsers I tested, Chrome, Firefox etc.)...

What could be the issue? :-) Any previous version I could try?

image

hjw2015 commented 6 months ago

+1 - same here since the last updates.

EinEinfach commented 6 months ago

Did you do that:

"Copy the dash_daq.min.js file from the repository you cloned into the dash_daq libraries folder and replace the existing file"

greymfm commented 6 months ago

OK, shouldn't the docker-script do this? ;-) Let me try to add this to the docker script...

EinEinfach commented 6 months ago

"OK, shouldn't the docker-script do this? ;-) Let me try to add this to the docker script..."

For sure! Without It won't be worked. The legacy dash_daq.min.js library is unfortunately bugged. And don't forget to reload the browser window after that

greymfm commented 6 months ago

OK, the Dockerfile is working correctly (with correct Joystick) if adding below lines to the Dockerfile:

added to Dockerfile (right after the line "COPY ./CaSSAndRA .") :

# bugfix some Python library
##RUN mkdir -p /root/.local/lib/python3.10/site-packages/dash_daq
##COPY ./bugfix_dash_daq_min/dash_daq.min.js /root/.local/lib/python3.10/site-packages/dash_daq
COPY ./bugfix_dash_daq_min/dash_daq.min.js /usr/local/lib/python3.10/site-packages/dash_daq
EinEinfach commented 6 months ago

I think user @disaster123 has a docker environment with working joystick, maybe he can share his trick

greymfm commented 6 months ago

Sorry, it's working correctly if the line above was added - Let me know if you want me to make a pull-request for this...

EinEinfach commented 6 months ago

Does it work if someone uses an other python version then 3.10

greymfm commented 6 months ago

It's for the specific Dockerfile provided in this project (as an easy starter). To make it universal, maybe we could apply the patch directly in the app.py ...

ShadedSelf commented 6 months ago

I dont know much about dockerfiles but it seems like it forces python 3.10. https://github.com/EinEinfach/CaSSAndRA/blob/e1b96232de54cf5fddbad36bef6652ef991778a8/Dockerfile#L1

ShadedSelf commented 6 months ago

Also, if we import the fixed JS file from the assets folder it should override the original function, assuming its loaded afterwards.