better comment, added test for BTM

This commit is contained in:
john30
2016-02-07 12:24:16 +01:00
parent c31ec3a073
commit a91d8ffd3b
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ static const dataType_t dataTypes[] = {
{"BTI", 24, bt_tim, BCD|REV|REQ, 0, 8, 8, 0}, // time in BCD, 00:00:00 - 23:59:59 (0x00,0x00,0x00 - 0x59,0x59,0x23)
{"HTI", 24, bt_tim, REQ, 0, 8, 8, 0}, // time, 00:00:00 - 23:59:59 (0x00,0x00,0x00 - 0x17,0x3b,0x3b)
{"VTI", 24, bt_tim, REV, 0x63, 8, 8, 0}, // time, 00:00:00 - 23:59:59 (0x00,0x00,0x00 - 0x3b,0x3b,0x17, replacement 0x63) [Vaillant type]
{"BTM", 16, bt_tim, BCD|REV, 0xff, 5, 5, 0}, // time in BCD, 00:00 - 23:59 (0x00,0x00 - 0x59,0x23, replacement 0xff) [Vaillant type]
{"BTM", 16, bt_tim, BCD|REV, 0xff, 5, 5, 0}, // time as hh:mm in BCD, 00:00 - 23:59 (0x00,0x00 - 0x59,0x23, replacement 0xff)
{"HTM", 16, bt_tim, REQ, 0, 5, 5, 0}, // time as hh:mm, 00:00 - 23:59 (0x00,0x00 - 0x17,0x3b)
{"VTM", 16, bt_tim, REV, 0xff, 5, 5, 0}, // time as hh:mm, 00:00 - 23:59 (0x00,0x00 - 0x3b,0x17, replacement 0xff) [Vaillant type]
{"TTM", 8, bt_tim, 0, 0x90, 5, 5, 10}, // truncated time (only multiple of 10 minutes), 00:00 - 24:00 (minutes div 10 + hour * 6 as integer)
+8
View File
@@ -105,6 +105,14 @@ int main()
{"x,,vti", "21:04:58", "10fe0700033a0415", "00", ""},
{"x,,vti", "-:-:-", "10fe070003636363", "00", ""},
{"x,,vti,2", "", "", "", "c"},
{"x,,btm", "21:04", "10fe0700020421", "00", ""},
{"x,,btm", "00:00", "10fe0700020000", "00", ""},
{"x,,btm", "23:59", "10fe0700025923", "00", ""},
{"x,,btm", "24:00", "10fe0700020024", "00", ""},
{"x,,btm", "-:-", "10fe070002ffff", "00", ""},
{"x,,btm", "", "10fe0700025924", "00", "rw"},
{"x,,btm", "24:01", "10fe0700020124", "00", "rw"},
{"x,,btm,2", "", "", "", "c"},
{"x,,htm", "21:04", "10fe0700021504", "00", ""},
{"x,,htm", "00:00", "10fe0700020000", "00", ""},
{"x,,htm", "23:59", "10fe070002173b", "00", ""},