18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 15:17:08 +01:00

comment: the wiper mask is read into an int, not the uint8_t

This commit is contained in:
jerrrrycho
2026-11-30 00:12:58 +01:00
parent ba6ad19c08
commit b0f7500004
+1 -1
View File
@@ -447,7 +447,7 @@ bool physics::Vehicle::readWiperList(std::string const &line)
WriteLog("Read WiperList: number of entries exceeded capacity of the data table");
return false;
}
// the mask of the wipers is a number: read into the uint8_t directly, the parser would take only its first character
// the mask of the wipers is a number: read into an int and clamped, as the parser would take only its first character for a uint8_t
int bytesum{0};
parser >> bytesum >> WiperList[idx].WiperSpeed >> WiperList[idx].interval >> WiperList[idx].outBackDelay;
WiperList[idx].byteSum = static_cast<uint8_t>(std::clamp(bytesum, 0, 255));