Commit f0e79f7
authored
Add rx device info frame as response to pings (ExpressLRS#1021)
CRSF defines a message called CRSF_FRAMETYPE_DEVICE_PING. This message allows to ping all devices (also called broadcast) or a certain device. If a device receives a ping it should respond with a CRSF_FRAMETYPE_DEVICE_INFO message.
The tx module already responds to this message for the lua script support. With ExpressLRS#997 our lua script also shows other devices but the rx did not get listed since it did not respond to the ping message.
This PR adds the device name for the rx targets and adds two responses to pings:
ping received from tx module (from the lua script): reply OTA
ping received from FC (needed for ardupilot): reply via UART
The method to generate the device info frame is moved in the crsf class and both tx+rx use the same method.
To inject the device info frame in the usual telemetry buffer a change in the logic was needed. The device info response of the FC would overwrite the device info response of the rx so the telemetry class makes sure that different buffers are used depending on the sender of a message.1 parent 8852dda commit f0e79f7
46 files changed
Lines changed: 263 additions & 81 deletions
File tree
- src
- include/target
- lib
- CRSF
- CrsfProtocol
- LUA
- Telemetry
- src
- test
- crsf_native
- telemetry_native
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
0 commit comments