Fix sensor id truncation on serialization
This commit is contained in:
parent
49e1aa98bf
commit
45676b3384
1 changed files with 2 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ public:
|
|||
Sensor(const QJsonObject& json)
|
||||
{
|
||||
type = static_cast<sensor_type_t>(json["SensorType"].toInt(0));
|
||||
id = json["Id"].toInt(0);
|
||||
id = json["Id"].toInteger(0);
|
||||
field = json["Field"].toDouble(0);
|
||||
lastSeen = QDateTime::fromString(json["LastSeen"].toString(""));
|
||||
hidden = json["Hidden"].toBool(false);
|
||||
|
|
@ -110,7 +110,7 @@ public:
|
|||
{
|
||||
json["Type"] = "Sensor";
|
||||
json["SensorType"] = static_cast<int>(type);
|
||||
json["Id"] = static_cast<int>(id);
|
||||
json["Id"] = static_cast<qint64>(id);
|
||||
json["Field"] = field;
|
||||
json["Name"] = name;
|
||||
json["GroupName"] = groupName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue