rhyst / linak-controller

A Python script to control Linak standing desks.
MIT License
358 stars 50 forks source link

Make desk base height a config option #29

Closed subraizada3 closed 2 years ago

subraizada3 commented 2 years ago

The tabletops of my Idasens measure 61 cm @ lowest setting to 126 cm @ highest setting, which is 1cm lower than the nonconfigurable default base height used here (details on that below).

tldr:

This commit adds a base_height config option / base-height argument. It also adds two more options/arguments, sit_height_offset and stand_height_offset. Those allow specifying an amount of mm above the base height, and then the absolute height to use is calculated at runtime. To maintain backwards compatibility, the sit/stand_height options are unchanged. The new *_height_offset options are not required, but if specified they will override the existing *_height options.


Measurement data:

One Idasen was purchased two years ago and used on a wooden floor; I measured it at that time and noted down the values since I myself was reverse engineering the bluetooth protocol.

The current one was purchased a few months ago at a different location and measured with a different measuring tape, on carpet.

My measuring tapes only had/have inches. The actual measurements on my current desk were just a bit (less than 1/4") under 24" (60.96 cm) at the lowest setting, and almost exactly 49.5" (125.73 cm) at the top. For my old desk, I had 24" and 49.75" saved in my notepad. When measuring, I did make sure to keep the tape perpendicular to the ground and desk, so I have no reason to believe that these values are inaccurate for my desks.

rhyst commented 2 years ago

Hey, thanks for the contribution! I'd be very happy to include this but can you add the options to the README as well?

subraizada3 commented 2 years ago

Done.

vniehues commented 2 years ago

@subraizada3 would you be able to add a max-height flag as well? That could solve #34 really fast :)

subraizada3 commented 2 years ago

@subraizada3 would you be able to add a max-height flag as well? That could solve #34 really fast :)

Added PR #35