diff options
author | 2025-03-06 23:57:42 -0500 | |
---|---|---|
committer | 2025-03-07 05:05:55 +0000 | |
commit | fbf23263cc1b77dc7da1b76252f9776826273677 (patch) | |
tree | f6c22d6b3d663eeb43c087be4a804598d613df99 /src | |
parent | 9ea6affdac7e9d47869ccb144f16a56f45d97c0f (diff) |
Fix HVAC temperature signals' data typessalmon
VSS 5.0 aligned all temperature signal data types to float, so our
use of the HVAC temperature signals needs to be updated to match.
Bug-AGL: SPEC-5386
Change-Id: I9a130c5b91ec5ca2a2eb1ef068eda55e0e3f7829
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/HvacService.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/HvacService.cpp b/src/HvacService.cpp index b909758..85f8c3a 100644 --- a/src/HvacService.cpp +++ b/src/HvacService.cpp @@ -81,14 +81,14 @@ void HvacService::HandleSignalChange(const std::string &path, const Datapoint &d std::cout << "HvacService::HandleSignalChange: Value received for " << path << std::endl; if (path == "Vehicle.Cabin.HVAC.Station.Row1.Driver.Temperature") { - if (dp.has_int32()) { - int temp = dp.int32(); + if (dp.has_float_()) { + int temp = (int) dp.float_(); if (temp >= 0 && temp < 256) set_left_temperature(temp); } } else if (path == "Vehicle.Cabin.HVAC.Station.Row1.Passenger.Temperature") { - if (dp.has_int32()) { - int temp = dp.int32(); + if (dp.has_float_()) { + int temp = (int) dp.float_(); if (temp >= 0 && temp < 256) set_right_temperature(temp); } @@ -193,7 +193,7 @@ void HvacService::set_left_temperature(uint8_t temp) // Push out new value m_broker->set("Vehicle.Cabin.HVAC.Station.Row1.Driver.Temperature", - (int) temp, + (float) temp, [this](const std::string &path, const Error &error) { HandleSignalSetError(path, error); }); @@ -206,7 +206,7 @@ void HvacService::set_right_temperature(uint8_t temp) // Push out new value m_broker->set("Vehicle.Cabin.HVAC.Station.Row1.Passenger.Temperature", - (int) temp, + (float) temp, [this](const std::string &path, const Error &error) { HandleSignalSetError(path, error); }); |