Fix Storing List Value Selection in setValue (#23)

* Fix Storing List Value Selection in setValue Command
This commit is contained in:
Justin Hammond 2020-01-22 11:49:10 +08:00 committed by GitHub
parent bcf82abe85
commit d33279b525
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,6 +118,7 @@ bool MqttCommand_SetValue::processMessage(rapidjson::Document &msg) {
break;
}
case QTOZW_ValueIds::ValueIdTypes::List: {
qDebug() << "Processing List";
if (!msg["Value"].IsUint()) {
this->sendSimpleStatus(false, QString("Incorrect Field Type for Value: Not Integer: ").append(msg["Value"].GetType()));
qCWarning(ozwmcsv) << "Incorrect Field Type (Integer) for " << GetCommand() << ": Value: " << msg["Value"].GetType();
@ -131,7 +132,9 @@ bool MqttCommand_SetValue::processMessage(rapidjson::Document &msg) {
return false;
}
list.selectedItem = list.labels[index];
data.fromValue<QTOZW_ValueIDList>(list);
qDebug() << list.selectedItem;
data.setValue<QTOZW_ValueIDList>(list);
qDebug() << data;
break;
}
case QTOZW_ValueIds::ValueIdTypes::Raw: {