From 6b11875a07f58817a82aae689458be90f8d691c0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 12 Aug 2010 18:40:13 +0800 Subject: print MRT station name --- easytool/easytool.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/easytool/easytool.c b/easytool/easytool.c index 6086916..4481385 100644 --- a/easytool/easytool.c +++ b/easytool/easytool.c @@ -96,7 +96,10 @@ struct easy_log_rec { uint8_t trans_type; uint16_t amount; /* transaction amount / value */ uint16_t remaining; /* remaining value on card _after_ trans */ - uint8_t unknown2[6]; + uint8_t unknown2; + uint8_t station_code; /* MRT station code */ + uint16_t reader_code; /* unique code of RFID reader */ + uint8_t unknown3[2]; } __attribute__ ((packed)); static time_t convert_timestamp(const uint8_t *easy_ts) @@ -113,6 +116,14 @@ static void dump_easy_log(const struct easy_log_rec *elr) t_tm->tm_hour, t_tm->tm_min, get_value_string(easy_tt_names, elr->trans_type), elr->amount, elr->remaining); + switch (elr->trans_type) { + case EASY_TT_MRT_ENTER: + case EASY_TT_MRT_EXIT: + printf("\tMRT Station %s\n", + get_value_string(taipei_mrt_stn_id, + elr->station_code)); + break; + } } static void dump_mfcl(mifare_tag *mft) -- cgit v1.2.3