diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-17 14:00:28 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-10 07:03:24 -0800 |
commit | 22f66501ac4075084c0fd1d0b0d943aa92df1306 (patch) | |
tree | 8dedaff461f109d531f45c7e6045ec54585e4975 /profile.c | |
parent | b88958ded55f6d437e74e6c753574128351ad257 (diff) | |
download | subsurface-22f66501ac4075084c0fd1d0b0d943aa92df1306.tar.gz |
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>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); } |