mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: turn plotdata::ceiling into depth_t
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9cf753fa56
commit
58d096adfc
4 changed files with 18 additions and 18 deletions
|
@ -70,9 +70,9 @@ static void put_pd(struct membuffer *b, const struct plot_info &pi, int idx)
|
|||
}
|
||||
put_int(b, entry.temperature);
|
||||
put_int(b, entry.depth.mm);
|
||||
put_int(b, entry.ceiling);
|
||||
put_int(b, entry.ceiling.mm);
|
||||
for (int i = 0; i < 16; i++)
|
||||
put_int(b, entry.ceilings[i]);
|
||||
put_int(b, entry.ceilings[i].mm);
|
||||
for (int i = 0; i < 16; i++)
|
||||
put_int(b, entry.percentages[i]);
|
||||
put_int(b, entry.ndl);
|
||||
|
@ -209,8 +209,8 @@ static std::string format_st_event(const plot_data &entry, const plot_data &next
|
|||
replace_all(format_string, "[temperature]", "");
|
||||
}
|
||||
|
||||
if (entry.ceiling) {
|
||||
value = get_depth_units(entry.ceiling, &decimals, &unit);
|
||||
if (entry.ceiling.mm > 0) {
|
||||
value = get_depth_units(entry.ceiling.mm, &decimals, &unit);
|
||||
replace_all(format_string,"[ceiling]", format_string_std("%02.2f %s", value, unit));
|
||||
} else {
|
||||
replace_all(format_string, "[ceiling]", "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue