feat(defaults): set WLToys 144010 2S CRSF gear limits as default and builtin preset

This commit is contained in:
bleack committed 2026-12-01 21:46:21 +01:00
1 parent 226daf6498
commit 92f53d449f
5 files changed
+53 -34

No files matched your search

+11 -11
View File
@@ -96,16 +96,16 @@ enum CockpitBoutonBit : uint16_t {
#define CRSF_VAL_MID 992 // 1500 us (Neutre)
#define CRSF_VAL_MAX 1811 // ~2012 us
// Plages de gaz progressives (Marche avant : rapports 1, 2, 3)
#define GAZ_AVANT_MIN 1065
// Plages de gaz progressives (Marche avant : rapports 1, 2, 3) — WLToys 144010
#define GAZ_AVANT_MIN 1105
const uint16_t GAZ_AVANT_MAX_PAR_VITESSE[3] = {
1100, // 1ère vitesse (Manœuvre)
1150, // 2ème vitesse (Normale)
1220 // 3ème vitesse (Rapide)
1160, // 1ère vitesse (Manœuvre)
1250, // 2ème vitesse (Normale)
1400 // 3ème vitesse (Rapide)
};
#define GAZ_ARRIERE_MIN 905
#define GAZ_ARRIERE_MAX 800
#define GAZ_ARRIERE_MIN 875
#define GAZ_ARRIERE_MAX 750
#define DEADZONE_PEDALE 800
// Configuration par défaut du volant G29
@@ -118,7 +118,7 @@ const uint16_t GAZ_AVANT_MAX_PAR_VITESSE[3] = {
#define PENTE_RESSORT_G29 7 // Raideur autour du centre : 1 a 7
#define ETAPES_INIT_FFB_TOTAL 2 // Nombre d'etapes d'init FFB initiales (0=Range, 1=Spring)
#define VIBRATION_DEFAUT 50 // Intensite par defaut des vibrations (0 a 100%)
#define MAGIC_NUMBER_CONFIG 0x4B // Identifiant de validite en EEPROM (mis a jour pour vitesses CRSF)
#define MAGIC_NUMBER_CONFIG 0x4C // Identifiant de validite en EEPROM (mis a jour pour vitesses WLToys 144010)
Adafruit_NeoPixel rgb_led(NUM_PIXELS, PIN_LED_RGB, NEO_GRB + NEO_KHZ800);
Adafruit_USBH_Host USBHost;
@@ -139,10 +139,10 @@ struct __attribute__((packed)) ConfigG29 {
uint16_t angleSouhaiteTotal; // Plage totale en degrés : 40 à 900
float expoVolant; // Expo volant : 0.0f à 0.8f
uint8_t intensiteVibration; // Intensité globale des vibrations : 0 à 100%
uint16_t gazAvantMin; // Seuil de démarrage marche avant (défaut 1065)
uint16_t gazAvantMin; // Seuil de démarrage marche avant (défaut 1105)
uint16_t gazAvantMax[3]; // Plafonds 1ère, 2ème, 3ème vitesse
uint16_t gazArriereMin; // Seuil de démarrage marche arrière (défaut 905)
uint16_t gazArriereMax; // Plafond marche arrière (défaut 800)
uint16_t gazArriereMin; // Seuil de démarrage marche arrière (défaut 875)
uint16_t gazArriereMax; // Plafond marche arrière (défaut 750)
uint8_t magicNumber; // Identifiant de validité en EEPROM (MAGIC_NUMBER_CONFIG)
};