Skip to content

Commit

Permalink
Remove std from floor to fallback to C
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahMaceri authored Sep 25, 2023
1 parent f8c931b commit 4dd7e31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Message::ParseSignalsStatus Message::parseSignals(const std::vector<uint8_t>& da
uint64_t v = 0;
for (const auto& signal : m_signals) {
if (signal.is_bigendian) {
uint32_t start_bit = 8 * ((uint32_t)std::floor(signal.start_bit / 8)) + (7 - (signal.start_bit % 8)); // Calculation taken from python CAN
uint32_t start_bit = 8 * ((uint32_t)floor(signal.start_bit / 8)) + (7 - (signal.start_bit % 8)); // Calculation taken from python CAN
v = data_big_endian << start_bit;
v = v >> (len - signal.size);
} else
Expand Down

0 comments on commit 4dd7e31

Please sign in to comment.