mirror of
https://github.com/bleackstorm/SteamFrame-FPV-Control-Center.git
synced 2026-12-03 07:31:57 +01:00
Merge pull request #17 from bleackstorm/feat/unified-wired-cockpit
Feat/unified wired cockpit
This commit is contained in:
2 files changed
+44
-12
No files matched your search
@@ -44,6 +44,34 @@ Firmware dual-core pour **Waveshare RP2350-USB-A** transformant un volant **Logi
|
||||
|
||||
---
|
||||
|
||||
## Mapping Complet des Touches du Logitech G29
|
||||
|
||||
### 1. Conduite, Radio CRSF & Retour de Force (RP2350)
|
||||
| Touche / Axe G29 | Action | Canal / Effet |
|
||||
| :--- | :--- | :--- |
|
||||
| **Volant** | Direction | `CH1` (plage `40..900°`, expo configurable) |
|
||||
| **Pédale Accélérateur** | Gaz progressifs selon rapport (`R`, `1`, `2`, `3`) | `CH2` |
|
||||
| **Pédale Frein** | Frein | `CH3` |
|
||||
| **Pédale Embrayage** | Embrayage | `CH4` |
|
||||
| **`R2`** | Bascule **Armé / Désarmé** *(au point mort `N`, gaz relâchés)* | `CH5` (`AUX1`) |
|
||||
| **Palette droite (`R1`) / gauche (`L1`)** | Monter / rétrograder un rapport (`R ⇄ N ⇄ 1 ⇄ 2 ⇄ 3`) | Boîte séquentielle + LEDs |
|
||||
| **Molette rouge (`CW` / `CCW`)** | Dureté du ressort de centrage FFB (`0..255`) | Retour de force |
|
||||
| **Boutons `+` / `-`** | Intensité des vibrations haptiques (`0..100 %`, `0` = coupé) | Haptique volant |
|
||||
| **Bouton central `Enter`** *(appui 2 s désarmé)* | Sauvegarde des réglages en mémoire Flash (EEPROM) | Persistance |
|
||||
|
||||
### 2. Commandes Cockpit SteamFrame FPV (`$G29_EVT` via Radxa / USB)
|
||||
| Touche G29 | Action dans `steamframe-fpv` | Toast OSD |
|
||||
| :--- | :--- | :--- |
|
||||
| **`Croix (✕)`**, **`PS`** ou **`R3`** | **Tare Head-Tracking** (recentre la vue et la nacelle) | `TARE HT OK` |
|
||||
| **`Rond (○)`** ou **`Share`** | **Enregistrement DVR** (Démarrer / Arrêter) | `DVR REC` / `DVR STOP` |
|
||||
| **`Triangle (△)`** | **Incrustation OSD** (Afficher / Masquer) | `OSD ON` / `OSD OFF` |
|
||||
| **`Carré (□)`** | **Mode de projection VR** (`Dome140` ➔ `Cylinder140` ➔ `FlatQuad`) | `PROJ: ...` |
|
||||
| **`D-Pad` Haut / Bas** | **Trim Tilt** caméra (`+1°` / `-1°`) | `TILT +1` / `TILT -1` |
|
||||
| **`D-Pad` Gauche / Droite** | **Trim Pan** caméra (`-1°` / `+1°`) | `PAN -1` / `PAN +1` |
|
||||
| **`Options`**, **`L3`** | Réservés (libres pour extensions futures) | — |
|
||||
|
||||
---
|
||||
|
||||
## Commandes Série (`Serial` & `Serial2`)
|
||||
|
||||
| Commande | Description |
|
||||
|
||||
+16
-12
@@ -763,18 +763,21 @@ void traiterTelemetrieCRSF() {
|
||||
}
|
||||
|
||||
// Relais de la télémétrie CRSF valide vers SteamFrame FPV (OSD via Radxa/USB)
|
||||
size_t totalLen = (size_t)paquetLongueurAttendue + 2;
|
||||
if (totalLen <= 64) {
|
||||
char bufCrsf[140];
|
||||
memcpy(bufCrsf, "$CRSF,", 6);
|
||||
static const char HEX_DIGITS[] = "0123456789ABCDEF";
|
||||
for (size_t i = 0; i < totalLen; i++) {
|
||||
uint8_t byteVal = crsfRxBuffer[i];
|
||||
bufCrsf[6 + i * 2] = HEX_DIGITS[(byteVal >> 4) & 0x0F];
|
||||
bufCrsf[6 + i * 2 + 1] = HEX_DIGITS[byteVal & 0x0F];
|
||||
// Ne jamais relayer 0x16 (RC_CHANNELS_PACKED) si GP1 reçoit un écho des trames émises
|
||||
if (frameType != 0x16) {
|
||||
size_t totalLen = (size_t)paquetLongueurAttendue + 2;
|
||||
if (totalLen <= 64) {
|
||||
char bufCrsf[140];
|
||||
memcpy(bufCrsf, "$CRSF,", 6);
|
||||
static const char HEX_DIGITS[] = "0123456789ABCDEF";
|
||||
for (size_t i = 0; i < totalLen; i++) {
|
||||
uint8_t byteVal = crsfRxBuffer[i];
|
||||
bufCrsf[6 + i * 2] = HEX_DIGITS[(byteVal >> 4) & 0x0F];
|
||||
bufCrsf[6 + i * 2 + 1] = HEX_DIGITS[byteVal & 0x0F];
|
||||
}
|
||||
bufCrsf[6 + totalLen * 2] = '\0';
|
||||
emettreLigneCockpit(bufCrsf);
|
||||
}
|
||||
bufCrsf[6 + totalLen * 2] = '\0';
|
||||
emettreLigneCockpit(bufCrsf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -808,7 +811,8 @@ void traiterTelemetrieCRSF() {
|
||||
|
||||
void emettreLigneCockpit(const char* ligne) {
|
||||
Serial2.println(ligne);
|
||||
if (cockpitEchoUSB) {
|
||||
int needed = (int)strlen(ligne) + 2;
|
||||
if (cockpitEchoUSB && Serial && Serial.availableForWrite() >= needed) {
|
||||
Serial.println(ligne);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user