Skip to content

Commit 73dd921

Browse files
authored
Merge branch 'iNavFlight:master' into flight_direction_osd
2 parents 64f3dc0 + 810e0fb commit 73dd921

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

docs/LED pin PWM.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ Normally LED pin is used to drive WS2812 led strip. LED pin is held low, and eve
77

88
As alternative function, it is possible to generate PWM signal with specified duty ratio on the LED pin.
99

10-
Feature can be used to drive external devices. It is also used to simulate [OSD joystick](OSD%20Joystick.md) to control cameras.
10+
Feature can be used to drive external devices such as a VTX power switch. Setting the PWM duty cycle to 100% or 0% can
11+
provide an extra PINIO pin. It is also used to simulate [OSD joystick](OSD%20Joystick.md) to control cameras.
1112

1213
PWM frequency is fixed to 24kHz with duty ratio between 0 and 100%:
1314

1415
![alt text](/docs/assets/images/led_pin_pwm.png "led pin pwm")
1516

17+
Note that the LED feature needs to be enabled when using the PIN in this mode (feature LED_STRIP).
18+
1619
There are four modes of operation:
1720
- low
1821
- high
@@ -88,3 +91,6 @@ To drive power LED with brightness control, Mosfet should be used:
8891

8992
![alt text](/docs/assets/images/ledpinpwmpowerled.png "led pin pwm power_led")
9093

94+
# Programming tab example for using the LED pin as a PINIO, such as for turning a VTX or camera on and off
95+
!(/docs/assets/images/led-as-pinio.png "led pin as pinio")
96+

docs/Programming Framework.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ IPF can be edited using INAV Configurator user interface, or via CLI. To use COn
7575
| 26 | Invert Roll | Inverts ROLL axis input for PID/PIFF controller |
7676
| 27 | Invert Pitch | Inverts PITCH axis input for PID/PIFF controller |
7777
| 28 | Invert Yaw | Inverts YAW axis input for PID/PIFF controller |
78-
| 29 | Override Throttlw | Override throttle value that is fed to the motors by mixer. Operand is scaled in us. `1000` means throttle cut, `1500` means half throttle |
78+
| 29 | Override Throttle | Override throttle value that is fed to the motors by mixer. Operand is scaled in us. `1000` means throttle cut, `1500` means half throttle |
7979
| 30 | Set VTx Band | Sets VTX band. Accepted values are `1-5` |
8080
| 31 | Set VTx Channel | Sets VTX channel. Accepted values are `1-8` |
8181
| 32 | Set OSD Layout | Sets OSD layout. Accepted values are `0-3` |
@@ -98,7 +98,7 @@ IPF can be edited using INAV Configurator user interface, or via CLI. To use COn
9898
| 49 | Timer | A simple on - off timer. `true` for the duration of `Operand A` [ms]. Then `false` for the duration of `Operand B` [ms]. |
9999
| 50 | Delta | This returns `true` when the value of `Operand A` has changed by the value of `Operand B` or greater within 100ms. ( \|ΔA\| >= B ) |
100100
| 51 | Approx Equals (A ~ B) | `true` if `Operand B` is within 1% of `Operand A`. |
101-
| 52 | LED Pin PWM | Value `Operand A` from [`0` : `100`] starts PWM generation on LED Pin. See [LED pin PWM](LED%20pin%20PWM.md). Any other value stops PWM generation (stop to allow ws2812 LEDs updates in shared modes). |
101+
| 52 | LED Pin PWM | Value `Operand A` from [`0` : `100`] PWM / PINIO generation on LED Pin. See [LED pin PWM](LED%20pin%20PWM.md). Any other value stops PWM generation (stop to allow ws2812 LEDs updates in shared modes). |
102102
| 53 | Disable GPS Sensor Fix | Disables the GNSS sensor fix. For testing GNSS failure. |
103103
| 54 | Mag calibration | Trigger a magnetometer calibration. |
104104
| 55 | Set Gimbal Sensitivity | Scales `Operand A` from [`-16` : `15`]

docs/Serial.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,37 @@ The allowable baud rates are as follows:
8989
| 14 | 1500000 |
9090
| 15 | 2000000 |
9191
| 16 | 2470000 |
92+
93+
94+
### Function numbers as of 2025
95+
96+
| Function | Number |
97+
| -------------------------- | -------------------------------------------------- |
98+
| NONE | 0, |
99+
| MSP | (1 << 0), // 1 |
100+
| GPS | (1 << 1), // 2 |
101+
| UNUSED_3 | (1 << 2), // 4 //Was FUNCTION_TELEMETRY_FRSKY |
102+
| TELEMETRY_HOTT | (1 << 3), // 8 |
103+
| TELEMETRY_LTM | (1 << 4), // 16 |
104+
| TELEMETRY_SMARTPORT | (1 << 5), // 32 |
105+
| RX_SERIAL | (1 << 6), // 64 |
106+
| BLACKBOX | (1 << 7), // 128 |
107+
| TELEMETRY_MAVLINK | (1 << 8), // 256 |
108+
| TELEMETRY_IBUS | (1 << 9), // 512 |
109+
| RCDEVICE | (1 << 10), // 1024 |
110+
| VTX_SMARTAUDIO | (1 << 11), // 2048 |
111+
| VTX_TRAMP | (1 << 12), // 4096 |
112+
| UNUSED_1 | (1 << 13), // 8192: former\ UAV_INTERCONNECT |
113+
| OPTICAL_FLOW | (1 << 14), // 16384 |
114+
| LOG | (1 << 15), // 32768 |
115+
| RANGEFINDER | (1 << 16), // 65536 |
116+
| VTX_FFPV | (1 << 17), // 131072 |
117+
| ESCSERIAL | (1 << 18), // 262144: this is used for both SERIALSHOT and ESC_SENSOR telemetry |
118+
| TELEMETRY_SIM | (1 << 19), // 524288 |
119+
| FRSKY_OSD | (1 << 20), // 1048576 |
120+
| DJI_HD_OSD | (1 << 21), // 2097152 |
121+
| SERVO_SERIAL | (1 << 22), // 4194304 |
122+
| TELEMETRY_SMARTPORT_MASTER | (1 << 23), // 8388608 |
123+
| UNUSED_2 | (1 << 24), // 16777216 |
124+
| MSP_OSD | (1 << 25), // 33554432 |
125+
24 KB
Loading

0 commit comments

Comments
 (0)