mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[dlt] Export boolean[] values (#4082)
This commit is contained in:
@@ -485,6 +485,12 @@ static void ValueToCsv(wpi::raw_ostream& os, const Entry& entry,
|
||||
fmt::print(os, "{}", val);
|
||||
return;
|
||||
}
|
||||
} else if (entry.type == "boolean[]") {
|
||||
std::vector<int> val;
|
||||
if (record.GetBooleanArray(&val)) {
|
||||
fmt::print(os, "{}", fmt::join(val, ";"));
|
||||
return;
|
||||
}
|
||||
} else if (entry.type == "double[]") {
|
||||
std::vector<double> val;
|
||||
if (record.GetDoubleArray(&val)) {
|
||||
|
||||
@@ -120,6 +120,13 @@ int main(int argc, const char** argv) {
|
||||
} else {
|
||||
fmt::print(" invalid\n");
|
||||
}
|
||||
} else if (entry->second.type == "boolean[]") {
|
||||
std::vector<int> val;
|
||||
if (record.GetBooleanArray(&val)) {
|
||||
fmt::print(" {}\n", fmt::join(val, ", "));
|
||||
} else {
|
||||
fmt::print(" invalid\n");
|
||||
}
|
||||
} else if (entry->second.type == "double[]") {
|
||||
std::vector<double> val;
|
||||
if (record.GetDoubleArray(&val)) {
|
||||
|
||||
Reference in New Issue
Block a user