rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
dshot_edt_t Struct Reference

When to send DSHOT_CMD_EDT_ENABLE, and whether the ESC has answered. More...

#include <dshot.h>

Data Fields

uint8_t left
uint8_t asks
uint32_t due_ms
bool answered
bool asked

Detailed Description

When to send DSHOT_CMD_EDT_ENABLE, and whether the ESC has answered.

One ask is DSHOT_CMD_REPEATS frames of the command in a row. An ESC only acts on a command while its motor is stopped, and AM32 only once it has armed itself on about a second of zero throttle. Every run on this bench starts from silence – a disarmed bench sends nothing, and AM32 restarts after 0.5s without a signal – so an ask made only in a run's first 10ms lands before AM32 can take it and extended telemetry never comes on.

So the ask is repeated, every DSHOT_EDT_RETRY_MS while the throttle is at zero, until an extended frame arrives or DSHOT_EDT_ASKS have gone without one. An ask only starts, and only continues, on a frame whose throttle is zero: a throttle the operator has asked for goes out on that frame, and an ask it interrupts is abandoned and started again from its first repeat.

Two lifetimes. What a run has asked and heard is owed again on every run, because an ESC forgets the setting when it restarts. asked follows the binding: from the first repeat of the first ask, replies are read as extended telemetry, because an ESC that kept power kept the setting and AM32 answers the command once, on a reply after its sixth repeat.

Field Documentation

◆ answered

bool dshot_edt_t::answered

an extended frame arrived this run

◆ asked

bool dshot_edt_t::asked

an ask has started since the binding

◆ asks

uint8_t dshot_edt_t::asks

asks completed this run

◆ due_ms

uint32_t dshot_edt_t::due_ms

when the next ask may start

◆ left

uint8_t dshot_edt_t::left

repeats still to send in the ask under way


The documentation for this struct was generated from the following file: