]> git.zerfleddert.de Git - hmcfgusb/commitdiff
hmland: only output load-byte on newest firmware
authorMichael Gernoth <michael@gernoth.net>
Sun, 21 Jun 2015 10:40:54 +0000 (12:40 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 21 Jun 2015 10:40:54 +0000 (12:40 +0200)
hmland.c

index c8aa00b56bfc30ca3c44285b339155bedf6ac77b..97a5b6c02bbbff28b13c20988ddab52960972791 100644 (file)
--- a/hmland.c
+++ b/hmland.c
@@ -289,8 +289,12 @@ static int hmlan_format_out(uint8_t *buf, int buf_len, void *data)
                        format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 3, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE);
                        format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 3, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE);
                        format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 4, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE);
-                       format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 2, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE);
-                       format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 1, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE | FLAG_NL);
+                       if (version < 0x03c7) {
+                               format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 2, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE | FLAG_NL);
+                       } else {
+                               format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 2, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE);
+                               format_part_out(&inpos, (buf_len-(inpos-buf)), &outpos, (sizeof(out)-(outpos-out)), 1, FLAG_FORMAT_HEX | FLAG_COMMA_BEFORE | FLAG_NL);
+                       }
 
                        if (!reboot_set) {
                                int new_reboot_seconds;
Impressum, Datenschutz