These can stay
This commit is contained in:
parent
c172d9cc19
commit
23514f6155
1 changed files with 7 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue