Merge "Change temp approximations to be accurate" into main

This commit is contained in:
Aaqib Ismail 2023-12-13 22:30:38 +00:00 committed by Android (Google) Code Review
commit 691b6a1adc
2 changed files with 5 additions and 5 deletions

View file

@ -2447,9 +2447,9 @@
160,
280,
5,
600,
840,
10
608,
824,
9
]
},
{
@ -2459,7 +2459,7 @@
66.19999694824219,
"VehicleUnit::FAHRENHEIT",
19.0,
66.0
66.2
]
}
},

View file

@ -482,7 +482,7 @@ int FakeVehicleHardware::getHvacTempNumIncrements(int requestedTemp, int minTemp
int increment) {
requestedTemp = std::max(requestedTemp, minTemp);
requestedTemp = std::min(requestedTemp, maxTemp);
int numIncrements = (requestedTemp - minTemp) / increment;
int numIncrements = std::round((requestedTemp - minTemp) / static_cast<float>(increment));
return numIncrements;
}