Decode route element float fields
This commit is contained in:
@@ -450,6 +450,13 @@ void AppendHexValue(std::ostringstream& aLine, const char* aLabel, uint64_t aVal
|
||||
aLine << " " << aLabel << "=0x" << std::hex << aValue << std::dec;
|
||||
}
|
||||
|
||||
float FloatFromBits(uint32_t aBits)
|
||||
{
|
||||
float value = 0.0f;
|
||||
std::memcpy(&value, &aBits, sizeof(value));
|
||||
return value;
|
||||
}
|
||||
|
||||
void LogHookCall(const char* aName, uint32_t aCount, void* aThis, void* a2, void* a3, void* a4)
|
||||
{
|
||||
std::ostringstream line;
|
||||
@@ -947,8 +954,12 @@ void AppendGpsResultElementArraySummary(std::ostringstream& aLine, const char* a
|
||||
continue;
|
||||
}
|
||||
|
||||
aLine << std::hex << h00 << "," << std::dec << u08 << "," << u0c << "," << u10 << "," << u14 << ","
|
||||
<< std::hex << h18 << "," << h20 << std::dec;
|
||||
const auto h18Lo = static_cast<uint32_t>(h18);
|
||||
const auto h18Hi = static_cast<uint32_t>(h18 >> 32);
|
||||
aLine << std::hex << h00 << ",0x" << std::setw(8) << std::setfill('0') << u08 << std::setfill(fill)
|
||||
<< std::dec << "," << u0c << "," << u10 << "," << u14 << "," << std::hex << h18 << std::dec
|
||||
<< "," << FloatFromBits(h18Lo) << "," << FloatFromBits(h18Hi) << "," << std::hex << h20
|
||||
<< std::dec;
|
||||
}
|
||||
aLine << "]";
|
||||
aLine.flags(flags);
|
||||
|
||||
Reference in New Issue
Block a user