Skip to content

Commit

Permalink
4way: always send 4 bytes to reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Aug 21, 2024
1 parent 0a24ed1 commit de56161
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/driver/serial_4way_avr_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,12 @@ uint8_t avr_bl_send_keepalive(gpio_pins_t pin) {
}

void avr_bl_send_restart(gpio_pins_t pin, uint8_t *data) {
uint8_t buf[] = {RestartBootloader, 0};
avr_bl_write(pin, buf, 2); // sends simply 4 x 0x00 (CRC =00)
esc_set_output(pin);
serial_write(pin, RestartBootloader);
serial_write(pin, 0);
serial_write(pin, 0);
serial_write(pin, 0);
esc_set_input(pin);
data[0] = 1;
}

Expand Down

0 comments on commit de56161

Please sign in to comment.