From 138096b4d2595818f0c14776e46a06cfc3395f6c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 12 Aug 2010 19:10:47 +0800 Subject: add transaction number parsing --- easytool/easytool.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easytool/easytool.c b/easytool/easytool.c index 8ab2262..b2436c6 100644 --- a/easytool/easytool.c +++ b/easytool/easytool.c @@ -91,7 +91,8 @@ static void parse_acc_bits(struct acc_bits_parsed *abp, uint8_t *acc_bits) /* storage of a transaction log record on the transponder itself */ struct easy_log_rec { - uint8_t unknown[2]; + uint8_t trans_id; + uint8_t unknown; uint8_t timestamp[3]; /* seconds since January 1st 1970 / 256 */ uint8_t trans_type; uint16_t amount; /* transaction amount / value */ @@ -111,9 +112,9 @@ static void dump_easy_log(const struct easy_log_rec *elr) { time_t t_time = convert_timestamp(elr->timestamp); struct tm *t_tm = gmtime(&t_time); - printf("%4u-%02u-%02u %02u:%02u | %10s | Paid %4u NTD | %4u NTD remaining\n", + printf("%4u-%02u-%02u %02u:%02u | %02x | %10s | Paid %4u NTD | %4u NTD remaining\n", t_tm->tm_year+1900, t_tm->tm_mon+1, t_tm->tm_mday, - t_tm->tm_hour, t_tm->tm_min, + t_tm->tm_hour, t_tm->tm_min, elr->trans_id, get_value_string(easy_tt_names, elr->trans_type), elr->amount, elr->remaining); switch (elr->trans_type) { -- cgit v1.2.3