-
Notifications
You must be signed in to change notification settings - Fork 49
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
Cannot move desk to base height #75
Comments
Hhmm, maybe there's a rounding issue somewhere. Does it work if if you use |
Yes, it does. |
My desk appears to move in 2mm increments when using
Watching while using the physical controls
I'll have a look to see if there's any obvious causes but I can't imagine it mattering too much 😄 |
Hi,
just noticed I cannot move my desk to the base height of 640mm (read from desk), "script ends with struct.error: ushort format requires 0 <= number <= 65535". Not sure if this is expected behavior, but from the description of the base_height option I think it isn't. Script version is latest 1.1.0 but same behavior on 1.0.3. Running it on Raspberry Pi 3, Raspberry OS (Bookworm), and on Linak's DPG1C controller.
I suppose after implementing the kaml's fix this script works for me reliably for a few days. Previously I could only read from the desk, now I can move it nicely 👍🏼
pi@malina:~ $ linak-controller --mac-address ED:72:E6:E6:EB:0F --move-to 640
Connected ED:72:E6:E6:EB:0F
Capabilities: {'memSize': 4, 'autoUp': True, 'autoDown': True, 'bleAllow': True, 'hasDisplay': True, 'hasLight': True}
User ID: 01 2f d6 d1 2a f0 81 c9 61 14 68 c1 f6 19 2f 0b e8
Base height from desk: 640mm
Height: 900mm
Moving to height: 640
Something unexpected went wrong:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.11/site-packages/linak_controller/main.py", line 210, in main
await run_command(client)
File "/home/pi/.local/lib/python3.11/site-packages/linak_controller/main.py", line 97, in run_command
await Desk.move_to(client, target)
File "/home/pi/.local/lib/python3.11/site-packages/linak_controller/desk.py", line 62, in move_to
data = ReferenceInputService.encode_height(target.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/lib/python3.11/site-packages/linak_controller/gatt.py", line 81, in encode_height
return bytearray(struct.pack("<H", int(height)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: ushort format requires 0 <= number <= 65535
The text was updated successfully, but these errors were encountered: