Index: sources/device/DeviceModels.h =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -r72c3c8c3e657738deaac373956fc5b0f390c6d56 --- sources/device/DeviceModels.h (.../DeviceModels.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/device/DeviceModels.h (.../DeviceModels.h) (revision 72c3c8c3e657738deaac373956fc5b0f390c6d56) @@ -91,24 +91,24 @@ // 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 - { 1, 1}, // "key" is the value accepted from QML mapped to HW - { 2, 3}, - { 3, 5}, - { 4, 6}, - { 5, 10}, + { 1, 10}, // "key" is the value accepted from QML mapped to HW + { 2, 30}, + { 3, 50}, + { 4, 70}, + { 5, 100}, }; public: // TODO : these needs to be available in Views - static const quint8 mBrightness_min = 2; - static const quint8 mBrightness_max = 10; + static const quint8 mBrightness_min = 10; + static const quint8 mBrightness_max = 100; static const quint8 mBrightness_res = 2; struct Data { quint8 mBrightness_old = mBrightness_min ; quint8 mBrightness_val = 0; - quint8 mBrightnessPercent = 5; // ~ 100% + quint8 mBrightnessPercent = 100; // ~ 100% bool mRead = false; } _data; @@ -126,11 +126,11 @@ 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, 1}, // "value" is the displayed number in QML for property "brightness" - { 3, 2}, - { 5, 3}, - { 6, 4}, - { 10, 5}, + { 10, 1}, // "value" is the displayed number in QML for property "brightness" + { 30, 2}, + { 50, 3}, + { 70, 4}, + { 100, 5}, }; public: