mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Add YAML output for session slices.
This commit is contained in:
parent
1a0a4bbf52
commit
26f6e15a75
@ -182,6 +182,21 @@ void SessionToYaml(QString filepath, Session* session)
|
||||
out << " start: " << ts(session->first()) << endl;
|
||||
out << " end: " << ts(session->last()) << endl;
|
||||
|
||||
if (!session->m_slices.isEmpty()) {
|
||||
out << " slices:" << endl;
|
||||
for (auto & slice : session->m_slices) {
|
||||
QString s;
|
||||
switch (slice.status) {
|
||||
case MaskOn: s = "mask on"; break;
|
||||
case MaskOff: s = "mask off"; break;
|
||||
case EquipmentOff: s = "equipment off"; break;
|
||||
default: s = "unknown"; break;
|
||||
}
|
||||
out << " - status: " << s << endl;
|
||||
out << " start: " << ts(slice.start) << endl;
|
||||
out << " end: " << ts(slice.end) << endl;
|
||||
}
|
||||
}
|
||||
Day day;
|
||||
day.addSession(session);
|
||||
out << " total_time: " << dur(day.total_time()) << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user