[ntcore] Use int64 for datalog type string (#5186)

There's a spec difference between NT4 and datalog for integers; NT4 uses
"int", datalog uses "int64". We were using "int" for datalog as well.

Also add backwards compatibility support to datalogtool for treating
"int" as "int64".
This commit is contained in:
Peter Johnson
2023-03-13 21:28:07 -07:00
committed by GitHub
parent 56b758320f
commit 53b5fd2ace
2 changed files with 3 additions and 2 deletions

View File

@@ -243,7 +243,7 @@ struct DataLoggerData {
int Start(TopicData* topic, int64_t time) {
return log.Start(fmt::format("{}{}", logPrefix,
wpi::drop_front(topic->name, prefix.size())),
topic->typeStr,
topic->typeStr == "int" ? "int64" : topic->typeStr,
DataLoggerEntry::MakeMetadata(topic->propertiesStr), time);
}