Index: sources/model/hd/adjustment/settings/MAdjustHDRequests.h =================================================================== diff -u -r54c4136d95375116e6daf23b7d4179159cf13d0c -rfec49d1a8016d25cedff4cf2fefb4c4cd1c7c259 --- sources/model/hd/adjustment/settings/MAdjustHDRequests.h (.../MAdjustHDRequests.h) (revision 54c4136d95375116e6daf23b7d4179159cf13d0c) +++ sources/model/hd/adjustment/settings/MAdjustHDRequests.h (.../MAdjustHDRequests.h) (revision fec49d1a8016d25cedff4cf2fefb4c4cd1c7c259) @@ -74,14 +74,27 @@ * */ class MAdjustHDAlarmVolumeReq : public MModel { + + const int hw2ui = 20; // HD vol range is [1-5] and we show [20%-100%] to user (100 / 5). + quint32 _volume =100; // values in range of [20, 40, 60, 80, 100] or [1..5]*20 + public: - quint32 volume; + quint32 volume2HD() const { + return _volume / hw2ui; + } + quint32 volume() { + return _volume; + } + void volume(quint32 vVolume) { + _volume = vVolume; + } + // disabled coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { - return toString( { volume } ); + return toString( { _volume } ); } // disabled coco end static QString toString(const QVariantList &vParameters) { @@ -127,7 +140,7 @@ } // disabled coco end static QString toString(const QVariantList &vParameters) { - return MModel::toString("VersionReq", vParameters); + return MModel::toString("POSTInfReq", vParameters); } static Can::Can_Id canid () { return Can::eChlid_UI_Sync; }