diff --git a/libnetmd/libnetmd.c b/libnetmd/libnetmd.c index 585c086..75d73c8 100644 --- a/libnetmd/libnetmd.c +++ b/libnetmd/libnetmd.c @@ -143,7 +143,10 @@ int netmd_request_track_time(netmd_dev_handle* dev, const uint16_t track, struct return 0; } - buffer->minute = bcd_to_proper(time_request + 28, 1) & 0xff; + // TODO: Could add "hour" to netmd_track struct later, but all consumers need to be updated then + int hours = bcd_to_proper(time_request + 27, 1) & 0xff; + + buffer->minute = (bcd_to_proper(time_request + 28, 1) & 0xff) + hours * 60; buffer->second = bcd_to_proper(time_request + 29, 1) & 0xff; buffer->tenth = bcd_to_proper(time_request + 30, 1) & 0xff; buffer->track = track;