diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-07-09 12:43:06 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-09 12:50:22 -0700 |
commit | d2a5bf87c4ea5280f552ee6b08554b310b78fdef (patch) | |
tree | abcf7c29100a40e32f9aa1a862611247bc9ec63e /core/libdivecomputer.c | |
parent | 55df5979941c924ce66b491f54ccbad0c3e7c232 (diff) | |
download | subsurface-d2a5bf87c4ea5280f552ee6b08554b310b78fdef.tar.gz |
QML UI: add dev_info data to AppLog
This should make it easier to tell how far we get downloading data
from dive computers.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r-- | core/libdivecomputer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index a44e4a1ca..6361a593e 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -37,6 +37,7 @@ char *dumpfile_name; char *logfile_name; const char *progress_bar_text = ""; +void (*progress_callback)(const char *text) = NULL; double progress_bar_fraction = 0.0; static int stoptime, stopdepth, ndl, po2, cns; @@ -484,6 +485,8 @@ static void dev_info(device_data_t *devdata, const char *fmt, ...) vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); progress_bar_text = buffer; + if (progress_callback) + (*progress_callback)(buffer); } static int import_dive_number = 0; |