feat: New formatting specification implemented

This commit is contained in:
Mateusz Pusz
2024-04-18 22:29:09 +01:00
parent 1e3a93d10c
commit fa04e93687
8 changed files with 376 additions and 329 deletions

View File

@@ -82,9 +82,7 @@ void print(std::string_view phase_name, timestamp start_ts, const glide_computer
const glide_computer::flight_point& new_point)
{
std::cout << MP_UNITS_STD_FMT::format(
"| {:<12} | {:>9{%N:.1} %U} (Total: {:>9{%N:.1} %U}) | {:>8{%N:.1} %U} (Total: {:>8{%N:.1} %U}) | {:>7{%N:.0} %U} "
"({:>6{%N:.0} %U}) "
"|\n",
"| {:<12} | {:>9:N[.1]} (Total: {:>9:N[.1]}) | {:>8:N[.1]} (Total: {:>8:N[.1]}) | {:>7:N[.0]} ({:>6:N[.0]}) |\n",
phase_name, value_cast<si::minute>(new_point.ts - point.ts), value_cast<si::minute>(new_point.ts - start_ts),
new_point.dist - point.dist, new_point.dist, new_point.alt - point.alt, new_point.alt);
}