mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add support for heartrate and bearing information in samples
libdivecomputer already supports this, but we didn't save it. Tested-by: Oscar Isoz <jan.oscar.isoz@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b88958ded5
commit
22f66501ac
6 changed files with 22 additions and 2 deletions
10
profile.c
10
profile.c
|
@ -918,6 +918,8 @@ struct plot_data *populate_plot_entries(struct dive *dive, struct divecomputer *
|
|||
entry->temperature = lasttemp = sample->temperature.mkelvin;
|
||||
else
|
||||
entry->temperature = lasttemp;
|
||||
entry->heartbeat = sample->heartbeat;
|
||||
entry->bearing = sample->bearing;
|
||||
|
||||
lasttime = time;
|
||||
lastdepth = depth;
|
||||
|
@ -1520,6 +1522,14 @@ static void plot_string(struct plot_data *entry, char *buf, int bufsize,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (entry->heartbeat) {
|
||||
memcpy(buf2, buf, bufsize);
|
||||
snprintf(buf, bufsize, translate("gettextFromC","%s\nheartbeat:%d"), buf2, entry->heartbeat);
|
||||
}
|
||||
if (entry->bearing) {
|
||||
memcpy(buf2, buf, bufsize);
|
||||
snprintf(buf, bufsize, translate("gettextFromC","%s\nbearing:%d"), buf2, entry->bearing);
|
||||
}
|
||||
free(buf2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue