Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ESC bootloader wakeup signal. #1444

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading