These can stay

This commit is contained in:
XANTRONIX 2023-12-27 13:41:20 -05:00
parent c172d9cc19
commit 23514f6155

View file

@ -36,7 +36,9 @@ static void usage(int argc, char **argv, const char *message, ...) {
exit(1);
}
static int ev_handler(struct can_frame *frame, hexagram_can_if *can_if) {
static int ev_handler(struct can_frame *frame, void *ctx) {
hexagram_can_if *can_if = ctx;
return hexagram_can_if_write(can_if, frame);
}
@ -98,16 +100,16 @@ int hexagram_main_dash2can(int argc, char **argv) {
goto error_can_if_open;
}
if ((schedule = hexagram_schedule_create(table, 4, can_if)) == NULL) {
goto error_schedule_create;
}
/* Engine temperature */
table[1].frame.data[1] = (uint8_t)((87.0 / 0.75) + 48);
/* Fuel status */
table[2].frame.data[2] = 0x0e;
if ((schedule = hexagram_schedule_create(table, 4, can_if)) == NULL) {
goto error_schedule_create;
}
hexagram_schedule_run(schedule);
while (1) {