From 6f1f92c9d13e7ab958f7249c91c341aaa6356bba Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 12 Dec 2022 16:04:38 +0100 Subject: [PATCH] i wonder if this even works --- mission/tmtc/TmStore.cpp | 5 +++-- tmtc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mission/tmtc/TmStore.cpp b/mission/tmtc/TmStore.cpp index 331348ab..960a2054 100644 --- a/mission/tmtc/TmStore.cpp +++ b/mission/tmtc/TmStore.cpp @@ -74,10 +74,11 @@ ReturnValue_t TmStore::storePacket(PusTmReader& reader) { } float seconds = 0.0; char* prefix = nullptr; - // TODO: Scan file timestamp from name somehow. Maybe use scanf or similar? - int count = sscanf(pathStr.c_str(), "%s%4" SCNu32 "-%2" SCNu32 "-%2" + int count = sscanf(pathStr.c_str(), "%s_%4" SCNu32 "-%2" SCNu32 "-%2" SCNu32 "T%2" SCNu32 ":%2" SCNu32 ":%fZ", prefix, &tod.year, &tod.month, &tod.day, &tod.hour, &tod.minute, &seconds); + tod.second = std::floor(seconds); + static_cast(count); } } // TODO: Need to find the file of the most recent file. diff --git a/tmtc b/tmtc index a55572db..30cf4736 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit a55572db2890ef9e8276c95ba8ebfb2d74a88f7c +Subproject commit 30cf47365fec68a4b78395de03ecb2ae95af4e7e