mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -509,7 +509,8 @@ void DataLog::AppendFloatArray(int entry, std::span<const float> arr,
|
||||
while ((arr.size() * 4) > kBlockSize) {
|
||||
buf = Reserve(kBlockSize);
|
||||
for (auto val : arr.subspan(0, kBlockSize / 4)) {
|
||||
wpi::util::support::endian::write32le(buf, std::bit_cast<uint32_t>(val));
|
||||
wpi::util::support::endian::write32le(buf,
|
||||
std::bit_cast<uint32_t>(val));
|
||||
buf += 4;
|
||||
}
|
||||
arr = arr.subspan(kBlockSize / 4);
|
||||
@@ -541,7 +542,8 @@ void DataLog::AppendDoubleArray(int entry, std::span<const double> arr,
|
||||
while ((arr.size() * 8) > kBlockSize) {
|
||||
buf = Reserve(kBlockSize);
|
||||
for (auto val : arr.subspan(0, kBlockSize / 8)) {
|
||||
wpi::util::support::endian::write64le(buf, std::bit_cast<uint64_t>(val));
|
||||
wpi::util::support::endian::write64le(buf,
|
||||
std::bit_cast<uint64_t>(val));
|
||||
buf += 8;
|
||||
}
|
||||
arr = arr.subspan(kBlockSize / 8);
|
||||
|
||||
Reference in New Issue
Block a user