theengs/app

Extend the Xiaomi Mi scales widgets to include weighing_mode

DigiH opened this issue · 1 comments

DigiH commented

While trying out and testing

#8

and the Xiaomi Mi scales widget not showing any details for me, and digging in the code briefly I saw that currently only only the weight and impedance is included for display.

else if (boxDevice.isScale) {
                if (boxDevice.hasImpedance)
                    loaderIndicators.sourceComponent = componentText_2l
                else
                    loaderIndicators.sourceComponent = componentText_1l
            }
else if (boxDevice.isScale) {
                    text.text = (settingsManager.tempUnit === 'C') ? boxDevice.weight.toFixed(1) : (boxDevice.weight * 2.20462).toFixed(1)
                    unit.text = (settingsManager.tempUnit === 'C') ? qsTr("kg") : qsTr("lbs")
                }
…
else if (boxDevice.isScale) {
                    textOne.font.pixelSize = bigAssMode ? 26 : 24
                    textTwo.font.pixelSize = bigAssMode ? 22 : 20

                    textOne.text = (settingsManager.tempUnit === 'C') ? boxDevice.weight.toFixed(1) + qsTr("kg") : (boxDevice.weight * 2.20462).toFixed(1) + qsTr("lbs")
                    if (boxDevice.impedance > 0) textTwo.text = boxDevice.impedance + " Ω"
                }

This is a feature request to also include the weighing_mode for both models inn the widget on all platforms.

DigiH commented

Closing as verified as implemented with iOS test build 1.1 (1010002)