Index: sources/device/DeviceModels.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rf6b80a12cbbf42bea4448b9f8424350f5496d624 --- sources/device/DeviceModels.h (.../DeviceModels.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/device/DeviceModels.h (.../DeviceModels.h) (revision f6b80a12cbbf42bea4448b9f8424350f5496d624) @@ -90,11 +90,11 @@ // But here it's the same. // TODO: improve later - this has to be match with HW2UI in response QMap UI2HW = { // the mapping is not linear so has to be mapped to keep the order - { 20, 1}, - { 40, 3}, - { 60, 5}, - { 80, 6}, - {100, 10}, + { 1, 1}, // "key" is the value accepted from QML mapped to HW + { 2, 3}, + { 3, 5}, + { 4, 6}, + { 5, 10}, }; public: // TODO : these needs to be available in Views @@ -107,7 +107,7 @@ quint8 mBrightness_old = mBrightness_min ; quint8 mBrightness_val = 0; - quint8 mBrightnessPercent = 100; + quint8 mBrightnessPercent = 5; // ~ 100% bool mRead = false; } _data; @@ -124,12 +124,12 @@ */ class MDeviceBrightnessResponse : public MDeviceResponseBase { // TODO: improve later - this has to be match with UI2HW in request - QMap HW2UI = { // the mapping is not linear so has to be mapped to keep the order - { 1, 20}, - { 3, 40}, - { 5, 60}, - { 6, 80}, - { 10, 100}, + QMap HW2UI = { // the mapping is not linear so has to be mapped to keep the order; + { 1, 1}, // "value" is the displayed number in QML for property "brightness" + { 3, 2}, + { 5, 3}, + { 6, 4}, + { 10, 5}, }; public: