diff --git a/datalogtool/src/main/native/cpp/Exporter.cpp b/datalogtool/src/main/native/cpp/Exporter.cpp index f28545f56b..9201c8f7a1 100644 --- a/datalogtool/src/main/native/cpp/Exporter.cpp +++ b/datalogtool/src/main/native/cpp/Exporter.cpp @@ -466,7 +466,8 @@ static void ValueToCsv(wpi::raw_ostream& os, const Entry& entry, fmt::print(os, "{}", val); return; } - } else if (entry.type == "int64") { + } else if (entry.type == "int64" || entry.type == "int") { + // support "int" for compatibility with old NT4 datalogs int64_t val; if (record.GetInteger(&val)) { fmt::print(os, "{}", val); diff --git a/ntcore/src/main/native/cpp/LocalStorage.cpp b/ntcore/src/main/native/cpp/LocalStorage.cpp index ec0d441458..7476621ebe 100644 --- a/ntcore/src/main/native/cpp/LocalStorage.cpp +++ b/ntcore/src/main/native/cpp/LocalStorage.cpp @@ -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); }