Skip to content

Commit

Permalink
Added ESC bootloader wakeup signal. Fixes #1443
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbeanton committed Dec 12, 2024
1 parent 59fa2f6 commit 0a9150d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/modules/src/serial_4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
#ifdef USE_SERIAL_4WAY_BLHELI_INTERFACE

//FreeRTOS includes
#include "FreeRTOS.h"
#include "task.h"

#include "motors.h"
#include "usec_time.h"
#include "led.h"
Expand Down Expand Up @@ -153,6 +157,18 @@ uint8_t esc4wayInit(void)
escCount++;
}

// Let ESCs enter bootloader mode
vTaskDelay(M2T(200));

// Make them stay in bootloader mode.
for (volatile uint8_t i = 0; i < NBR_OF_MOTORS; i++) {
motorsESCSetOutput(i);
motorsESCSetLo(i);
vTaskDelay(M2T(1));
motorsESCSetInput(i);
motorsESCSetHi(i);
}

return escCount;
}

Expand Down

0 comments on commit 0a9150d

Please sign in to comment.