5 ms·
Cool! I'm wondering why is the lid-opening angle a 16 bit value without any scaling? Can MacBooks be opened > 255°? :) (https://github.com/ufoym/mac-angle/blob
by tos1 1y ago
Cool! I'm wondering why is the lid-opening angle a 16 bit value without any scaling? Can MacBooks be opened > 255°? :)
(https://github.com/ufoym/mac-angle/blob/main/angle.cpp#L186 https://github.com/ufoym/mac-angle/blob/main/angle.cpp#L186)
- GranPC 1y agoTechnically yes - might have a bit of a hard time closing it back down tho.
- deleted 1y ago[deleted]
- chippiewill 1y agoIt's a low level library, it's probably just the register on the sensor itself is 16bit so that's what gets propagated up to the OS. The most I can reach on mine is 132deg
- mort96 1y agoThe underlying system API is a u16. Do you propose that this library should add logic to clamp the value between 0 and 255? What would be the point in that?
- bboygravity 1y agoTo save 1 byte in RAM for the 300MB electron app that will load this lib.