mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 07:13:56 -04:00
AP_FETtecOneWire: Fix spelling in comments (NFC)
This commit is contained in:
parent
bfded82da5
commit
95effd59ea
@ -141,7 +141,7 @@ void AP_FETtecOneWire::init()
|
||||
|
||||
// initialise ESC ids. This enforces that the FETtec ESC ids
|
||||
// inside FETtec ESCs need to be contiguous and start at ID 1
|
||||
// which required by fast-throttle commands.
|
||||
// which is required by fast-throttle commands.
|
||||
uint8_t esc_offset = 0; // offset into our device-driver dynamically-allocated array of ESCs
|
||||
uint8_t esc_id = 1; // ESC ids inside FETtec protocol are one-indexed
|
||||
uint8_t servo_chan_offset = 0; // offset into _motor_mask_parameter array
|
||||
|
@ -4,7 +4,7 @@ FETtec OneWire is an [ESC](https://en.wikipedia.org/wiki/Electronic_speed_contro
|
||||
It is a (bidirectional) [digital full-duplex asynchronous serial communication protocol](https://en.wikipedia.org/wiki/Asynchronous_serial_communication) running at 500Kbit/s Baudrate. It requires three wire (RX, TX and GND) connection (albeit the name OneWire) regardless of the number of ESCs connected.
|
||||
Unlike bidirectional-Dshot, the FETtec OneWire protocol does not need one DMA channel per ESC for bidirectional communication.
|
||||
|
||||
For purchase, connection and configuration information please see the [Ardupilot FETtec OneWire wiki page](https://ardupilot.org/copter/docs/common-fettec-onewire.html).
|
||||
For purchase, connection and configuration information please see the [ArduPilot FETtec OneWire wiki page](https://ardupilot.org/copter/docs/common-fettec-onewire.html).
|
||||
|
||||
## Features of this device driver
|
||||
|
||||
@ -39,9 +39,9 @@ For purchase, connection and configuration information please see the [Ardupilot
|
||||
- fly a copter over a simulated serial link connection
|
||||
|
||||
|
||||
## Ardupilot to ESC protocol
|
||||
## ArduPilot to ESC protocol
|
||||
|
||||
The FETtec OneWire protocol supports up to 24 ESCs. As most copters only use at most 12 motors, Ardupilot's implementation supports only 12 (`ESC_TELEM_MAX_ESCS`)to save memory.
|
||||
The FETtec OneWire protocol supports up to 24 ESCs. As most copters only use at most 12 motors, ArduPilot's implementation supports only 12 (`ESC_TELEM_MAX_ESCS`)to save memory.
|
||||
|
||||
There are two types of messages sent to the ESCs configuration and fast-throttle messages:
|
||||
|
||||
@ -95,7 +95,7 @@ The signal is used to transfer the eleven bit throttle signals with as few bytes
|
||||
All motors wait for the complete message with all throttle signals before changing their output.
|
||||
|
||||
If telemetry is requested the ESCs will answer them in the ESC-ID order.
|
||||
See *ESC to Ardupilot Protocol* section below and comments in `AP_FETtecOneWire.cpp` for details.
|
||||
See *ESC to ArduPilot Protocol* section below and comments in `AP_FETtecOneWire.cpp` for details.
|
||||
|
||||
|
||||
### Timing
|
||||
@ -103,13 +103,13 @@ See *ESC to Ardupilot Protocol* section below and comments in `AP_FETtecOneWire.
|
||||
Four ESCs need 90us for the fast-throttle request and telemetry reception. With four ESCs 11kHz update would be possible.
|
||||
Each additional ESC adds 11 extra fast-throttle command bits, so the update rate is lowered by each additional ESC.
|
||||
If you use 8 ESCs, it needs 160us including telemetry response, so 5.8kHz update rate would be possible.
|
||||
The FETtec Ardupilot device driver limits the message transmit period to `_min_fast_throttle_period_us` according to the number of ESCs used.
|
||||
The FETtec ArduPilot device driver limits the message transmit period to `_min_fast_throttle_period_us` according to the number of ESCs used.
|
||||
The update() function has an extra invocation period limit so that even at very high loop rates the the ESCs will still operate correctly albeit doing some decimation.
|
||||
The current update rate for Copter is 400Hz (~2500us) and for other vehicles is 50Hz (~20000us) so we are bellow device driver limit.
|
||||
|
||||
**Note:** The FETtec ESCs firmware requires at least a 4Hz fast-throttle update rate (max. 250ms between messages) otherwise the FETtec ESC disarm (stop) the motors.
|
||||
|
||||
## ESC to Ardupilot protocol
|
||||
## ESC to ArduPilot protocol
|
||||
|
||||
OneWire ESC telemetry information is sent back to the autopilot:
|
||||
|
||||
@ -120,7 +120,7 @@ OneWire ESC telemetry information is sent back to the autopilot:
|
||||
- Temperature (°C/10)
|
||||
- CRC errors (ArduPilot->ESC) counter
|
||||
|
||||
This information is used by Ardupilot to:
|
||||
This information is used by ArduPilot to:
|
||||
|
||||
- log the status of each ESC to the SDCard or internal Flash, for post flight analysis
|
||||
- send the status of each ESC to the ground station or companion computer for real-time monitoring
|
||||
@ -137,8 +137,8 @@ The data is forwarded to the `AP_ESC_Telem` class that distributes it to other p
|
||||
|
||||
There are two public top level functions `update()` and `pre_arm_check()`.
|
||||
And these two call all other private internal functions.
|
||||
A single (per ESC) state variable (`_escs[i]._state`) is used in both the RX and TX state machnines.
|
||||
Here is the callgraph:
|
||||
A single (per ESC) state variable (`_escs[i]._state`) is used in both the RX and TX state machines.
|
||||
Here is the call graph:
|
||||
|
||||
```
|
||||
update()
|
||||
|
Loading…
Reference in New Issue
Block a user