mitsu70x: Partially back out the reformatting of the component checksums

Mitsubishi is confusing sometimes..
This commit is contained in:
Solomon Peachy 2016-12-02 18:57:54 -05:00
parent d8b3b600db
commit f1d39aafc5
1 changed files with 7 additions and 8 deletions

View File

@ -303,8 +303,7 @@ struct mitsu70x_status_deck {
} __attribute__((packed));
struct mitsu70x_status_ver {
char ver[5];
char ver2; /* Printed as part of the checksum..? */
char ver[6];
uint16_t checksum; /* Presumably BE */
} __attribute__((packed));
@ -1526,12 +1525,12 @@ static void mitsu70x_dump_printerstatus(struct mitsu70x_printerstatus_resp *resp
}
DEBUG2("\n");
for (i = 0 ; i < 7 ; i++) {
char buf[6];
char buf[7];
char type;
if (resp->vers[i].ver2 == '@') /* "DUMMY@" */
if (resp->vers[i].ver[5] == '@') /* "DUMMY@" */
continue;
memcpy(buf, resp->vers[i].ver, 5);
buf[5] = 0;
memcpy(buf, resp->vers[i].ver, 6);
buf[6] = 0;
if (i == 0) type = 'M';
else if (i == 1) type = 'L';
else if (i == 2) type = 'R';
@ -1539,8 +1538,8 @@ static void mitsu70x_dump_printerstatus(struct mitsu70x_printerstatus_resp *resp
else if (i == 4) type = 'F';
else type = i + 0x30;
INFO("FW Component: %c %s %c%04x\n",
type, buf, resp->vers[i].ver2, be16_to_cpu(resp->vers[i].checksum));
INFO("FW Component: %c %s (%04x)\n",
type, buf, be16_to_cpu(resp->vers[i].checksum));
}
INFO("Lower Mechanical Status: %s\n",