diff --git a/src/suunto_eon.c b/src/suunto_eon.c index f9c166b..77f97c7 100644 --- a/src/suunto_eon.c +++ b/src/suunto_eon.c @@ -125,6 +125,10 @@ suunto_eon_device_dump (device_t *abstract, unsigned char data[], unsigned int s if (! device_is_suunto_eon (abstract)) return DEVICE_STATUS_TYPE_MISMATCH; + // Enable progress notifications. + device_progress_state_t progress; + progress_init (&progress, abstract, SUUNTO_EON_MEMORY_SIZE + 1); + // Send the command. unsigned char command[1] = {'P'}; int rc = serial_write (device->port, command, sizeof (command)); @@ -141,6 +145,8 @@ suunto_eon_device_dump (device_t *abstract, unsigned char data[], unsigned int s return EXITCODE (rc); } + progress_event (&progress, DEVICE_EVENT_PROGRESS, sizeof (answer)); + // Verify the checksum of the package. unsigned char crc = answer[sizeof (answer) - 1]; unsigned char ccrc = checksum_add_uint8 (answer, sizeof (answer) - 1, 0x00);