define SBUS in config

This commit is contained in:
2026-02-14 21:58:39 +01:00
parent 4ccfc5128b
commit 40d2880fdc
6 changed files with 259 additions and 183 deletions

View File

@ -93,11 +93,21 @@ GND -> Common Ground
- Add 100-500µF capacitor near strips
- Add 330Ω resistor on data line
### PWM Signal
### PWM Signal Mode
- Standard RC PWM: 1000-2000µs pulse width
- 1500µs threshold for mode switching
- Rising edge >1500µs after <1500µs triggers next mode
### SBUS Mode (FrSky X4R-SB)
```
X4R-SB SBUS/CH4 → ESP32 UART1 RX Pin (configured GPIO)
```
**Note**: The FrSky X4R-SB outputs inverted SBUS. The module automatically handles this inversion.
## Development
### Adding New Animations
@ -118,6 +128,23 @@ idf.py monitor
# Exit monitor: Ctrl+]
```
#### Debug Output (SBUS Mode Only)
```c
// Print all 16 channels to console
rcsignal_debug_print_channels();
```
Example output:
```
I (12345) RCSIGNAL: SBUS Channels:
I (12345) RCSIGNAL: CH1: 992 CH2: 992 CH3: 172 CH4: 1811
I (12345) RCSIGNAL: CH5: 992 CH6: 992 CH7: 992 CH8: 992
I (12345) RCSIGNAL: CH9: 992 CH10: 992 CH11: 992 CH12: 992
I (12345) RCSIGNAL: CH13: 992 CH14: 992 CH15: 992 CH16: 992
I (12345) RCSIGNAL: Trigger channel (CH4): 1811
```
## License
See [LICENSE](LICENSE)