Tinkerforge / esp32-firmware

Firmwares for ESP32 Brick and ESP32 Ethernet Brick (including firmwares for WARP/WARP2 Charger, WARP Energy Manager)
https://www.tinkerforge.com/en/doc/Hardware/Bricks/ESP32_Ethernet_Brick.html
25 stars 20 forks source link

OutputFloat: Automatically set maxFractionalDigitsOnPage and maxUnitLengthOnPage per sub page. #257

Open rtrbt opened 1 year ago

rtrbt commented 1 year ago

This requires porting the status page to preact first. Then every page has a element as root. In this element create a Context and use it in . With this context, pass a shared signal to all OutputFloats on a page. The OutputFloats can then set the signal to their digits and unit length if it is a new max. To dynamically allow decreasing a max, also store the last OutputFloat (by for example a ref or a unique ID) that has set a higher max value.