oh god sscanf
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
fba820a1c0
commit
c493273a21
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <cinttypes>
|
||||||
|
|
||||||
using namespace returnvalue;
|
using namespace returnvalue;
|
||||||
|
|
||||||
@ -66,8 +67,17 @@ ReturnValue_t TmStore::storePacket(PusTmReader& reader) {
|
|||||||
if (file.is_directory()) {
|
if (file.is_directory()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto path = file.path();
|
auto pathStr = file.path().string();
|
||||||
|
Clock::TimeOfDay_t tod;
|
||||||
|
if(pathStr.find(baseName) == std::string::npos) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
float seconds = 0.0;
|
||||||
|
char* prefix = nullptr;
|
||||||
// TODO: Scan file timestamp from name somehow. Maybe use scanf or similar?
|
// TODO: Scan file timestamp from name somehow. Maybe use scanf or similar?
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Need to find the file of the most recent file.
|
// TODO: Need to find the file of the most recent file.
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 96e27e716349bf01cac11c7e7b0b497a36149e87
|
Subproject commit a55572db2890ef9e8276c95ba8ebfb2d74a88f7c
|
Loading…
Reference in New Issue
Block a user