Closed AndKe closed 3 years ago
@AndKe Yestarday I pushed different changes. Some of them were affected by bad performances. The latest version should be acceptable. Are you sure you tested the latest version?
Furthermore, are you running the program from an IDE or directly from python? When running with IDEs the performances are really bad because of debugging.
On google glass, however, the spinbboxes cover a part of the PFD/Speed tape.
Consider that such spinboxes are only required now for testing and will be removed later.
@AndKe Performances are now better, you can test it ;-) And there is a wide margin of possible improvements.
I started and changed the values, then the that page load in google glass. It does load in a timely fashion, nothing unusual about the load time, but then I changed (slowly) the roll - and as you can see, even 10 seconds after, it is showing the original position. Occasinally, the communication will time out (animated cube seen for less than a second) - then the picture is current when it instantly appears, but no change is reflected on the glass. The device gets unusually hot.
The errors below is not something I have not seen earlier, it is just bit more often now. IP 192.168.1.22 is the google glass
/home/andre/prog/PycharmProjects/PFD/venv/bin/python /home/andre/prog/PycharmProjects/PFD/PFD.py
remi.server INFO Started httpserver http://0.0.0.0:8081/
remi.request INFO built UI (path=/)
127.0.0.1 - - [04/Feb/2021 16:37:52] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [04/Feb/2021 16:37:52] "GET /res:style.css HTTP/1.1" 200 -
remi.server.ws INFO connection established: ('127.0.0.1', 35268)
remi.server.ws INFO handshake complete
127.0.0.1 - - [04/Feb/2021 16:37:52] "GET /res:font.woff2 HTTP/1.1" 200 -
192.168.1.22 - - [04/Feb/2021 16:39:26] "GET / HTTP/1.1" 200 -
192.168.1.22 - - [04/Feb/2021 16:39:26] "GET /res:style.css HTTP/1.1" 200 -
remi.server.ws INFO connection established: ('192.168.1.22', 50711)
remi.server.ws INFO handshake complete
remi.server.ws ERROR Error managing incoming websocket message
Traceback (most recent call last):
File "/home/andre/prog/PycharmProjects/PFD/venv/lib/python3.8/site-packages/remi/server.py", line 165, in read_next_message
length = self.bytetonum(length[1]) & 127
IndexError: index out of range
192.168.1.22 - - [04/Feb/2021 16:43:31] "GET / HTTP/1.1" 200 -
remi.server.ws INFO connection established: ('192.168.1.22', 43201)
remi.server.ws INFO handshake complete
remi.server.ws ERROR Error managing incoming websocket message
Traceback (most recent call last):
File "/home/andre/prog/PycharmProjects/PFD/venv/lib/python3.8/site-packages/remi/server.py", line 165, in read_next_message
length = self.bytetonum(length[1]) & 127
IndexError: index out of range
remi.server.ws INFO connection established: ('192.168.1.22', 43203)
remi.server.ws INFO handshake complete
remi.server.ws ERROR Error managing incoming websocket message
Traceback (most recent call last):
File "/home/andre/prog/PycharmProjects/PFD/venv/lib/python3.8/site-packages/remi/server.py", line 165, in read_next_message
length = self.bytetonum(length[1]) & 127
IndexError: index out of range
remi.server.ws INFO connection established: ('192.168.1.22', 43204)
remi.server.ws INFO handshake complete
remi.server.ws ERROR Error managing incoming websocket message
Traceback (most recent call last):
File "/home/andre/prog/PycharmProjects/PFD/venv/lib/python3.8/site-packages/remi/server.py", line 165, in read_next_message
length = self.bytetonum(length[1]) & 127
IndexError: index out of range
remi.server.ws INFO connection established: ('192.168.1.22', 43205)
remi.server.ws INFO handshake complete
remi.server.ws ERROR Error managing incoming websocket message
Traceback (most recent call last):
File "/home/andre/prog/PycharmProjects/PFD/venv/lib/python3.8/site-packages/remi/server.py", line 165, in read_next_message
length = self.bytetonum(length[1]) & 127
IndexError: index out of range
remi.server.ws INFO connection established: ('192.168.1.22', 43206)
remi.server.ws INFO handshake complete
remi.server.ws ERROR Error managing incoming websocket message
Traceback (most recent call last):
File "/home/andre/prog/PycharmProjects/PFD/venv/lib/python3.8/site-packages/remi/server.py", line 165, in read_next_message
length = self.bytetonum(length[1]) & 127
IndexError: index out of range
can there be some kind of race condition between the spinboxes that overlay the PFD?
@AndKe I suppose it is caused by the refresh interval that I changed recently
@AndKe I changed the refresh interval as default. Please try the latest version. Some questions:
@dddomodossola You are right, the 10ms update interval was too much for the glasses I guess. removing the update_interval made it behave normally. I also tried 10hz refresh which works well too.
Dodumentation does not say what is the default when this setting is omitted. "update_interval: GUI update interval in seconds. If zero, the update happens at each change. If zero, the App.idle method is not called."
If I set it to 0.1 , it will update at 10hz, the question is: are the updates transmitted and the screen refreshed fully, or are just changed elements redrawn, or is the update just skipped if no data changed since last time ?
Only changed elements are redrawn, and update is skipped in case of no changes (but idle loop is executed however if update_interval >0)
This may be a good time to facilitate an important part: To start another thread that can fetch telemetry data, decode it, adapt/process it, then set proper PFD variables. I can provide the code to produce some sample-data. such thread would need only to write variables to PFD, but some mechanism may be needed in order have PFD avoid variables that are being updated, a semaphore?
This would also remove the need for the sliders, and we could get closer to the native resolution of the glass.
@dddomodossola The current version looks nice. On google glass, however, the spinbboxes cover a part of the PFD/Speed tape. Also, the delay is easily accumulated to +10 or more seconds. I may scroll thru any value of 1..20 in 5 seconds. , the glass may update "5" after three seconds, get to "10" in ten seconds, then apparently never finish.
I am not familiar with the way the updates works/what and how things are sent, but I suspect the relocation of the spinboxes may be causing this issue.