Files
xcopilot/PythonPlugins/controls.json
T
pali112 1705960c6e XCoPilot - lokalny AI co-pilot dla X-Plane 12 (llama.cpp + sterowanie datarefami)
- PI_XCoPilot.py: co-pilot odpowiadajacy strukturalnym JSON-em z akcjami,
  ktore wtyczka wykonuje na datarefach/komendach X-Plane.
- controls.json: mapowanie akcji -> datarefy (default + per-samolot),
  z kompletnym profilem Zibo 737-800X (laminar/B738/*) i przykładem ToLiss.
- Okno widoczne w VR, głos (whisper STT + piper TTS), PTT.
- config.example.json: przykładowa konfiguracja LLM/głosu.
2026-11-17 11:38:32 +01:00

107 lines
9.2 KiB
JSON

{
"_comment": "Mapowanie akcji (nazw) -> datarefy/komendy X-Plane. Sekcja 'default' stosowana dla wszystkich samolotow; sekcja 'aircraft' nadpisuje/rozszerza default dla pasujacych samolotow (match = fragment sciezki ACF lub kodu ICAO, wielkosc liter bez znaczenia). Akcje z 'value' = '{value}' przyjmuja parametr od AI.",
"default": {
"controls": {
"gear_up": { "desc": "Chowaj podwozie", "ops": [ { "cmd": "sim/flight_controls/landing_gear_up" } ] },
"gear_down": { "desc": "Wysun podwozie", "ops": [ { "cmd": "sim/flight_controls/landing_gear_down" } ] },
"gear_toggle": { "desc": "Przelacz podwozie", "ops": [ { "cmd": "sim/flight_controls/landing_gear_toggle" } ] },
"flaps_up": { "desc": "Klapy o jeden stopien do gory", "ops": [ { "cmd": "sim/flight_controls/flaps_up" } ] },
"flaps_down": { "desc": "Klapy o jeden stopien w dol", "ops": [ { "cmd": "sim/flight_controls/flaps_down" } ] },
"set_flaps": { "desc": "Ustaw klapy (value 0..1)", "ops": [ { "set": "sim/cockpit2/controls/flap_ratio", "value": "{value}" } ] },
"ap_on": { "desc": "Wlacz autopilota", "ops": [ { "cmd": "sim/autopilot/servos_on" } ] },
"ap_off": { "desc": "Wylacz autopilota", "ops": [ { "cmd": "sim/autopilot/servos_off" } ] },
"set_heading": { "desc": "Ustaw kierunek autopilota (value=stopnie magnetyczne)", "ops": [ { "set": "sim/cockpit/autopilot/heading_mag", "value": "{value}" } ] },
"set_altitude": { "desc": "Ustaw wysokosc autopilota (value=stopy)", "ops": [ { "set": "sim/cockpit/autopilot/altitude", "value": "{value}" } ] },
"set_speed": { "desc": "Ustaw predkosc autopilota (value=wezly)", "ops": [ { "set": "sim/cockpit/autopilot/airspeed", "value": "{value}" } ] },
"set_vs": { "desc": "Ustaw predkosc pionowa autopilota (value=fpm)", "ops": [ { "set": "sim/cockpit/autopilot/vertical_velocity", "value": "{value}" } ] },
"autothrottle_on": { "desc": "Wlacz auto-throttle", "ops": [ { "cmd": "sim/autopilot/autothrottle_on" } ] },
"autothrottle_off": { "desc": "Wylacz auto-throttle", "ops": [ { "cmd": "sim/autopilot/autothrottle_off" } ] },
"set_speedbrake": { "desc": "Ustaw hamulec aerodynamiczny (value 0..1)", "ops": [ { "set": "sim/cockpit2/controls/speedbrake_ratio", "value": "{value}" } ] },
"brake_parking_on": { "desc": "Zaciagnij hamulec postojowy", "ops": [ { "set": "sim/cockpit2/controls/parking_brake_ratio", "value": 1.0 } ] },
"brake_parking_off":{ "desc": "Zwolnij hamulec postojowy", "ops": [ { "set": "sim/cockpit2/controls/parking_brake_ratio", "value": 0.0 } ] },
"set_qnh": { "desc": "Ustaw cisnienie barometryczne (value=inHg, np. 29.92)", "ops": [ { "set": "sim/cockpit/misc/barometer_setting", "value": "{value}" } ] },
"set_squawk": { "desc": "Ustaw kod transpondera (value=4 cyfry)", "ops": [ { "set": "sim/cockpit/radios/transponder_code", "value": "{value}" } ] },
"set_com1": { "desc": "Ustaw czestotliwosc COM1 (value=kHz, np. 118300)", "ops": [ { "set": "sim/cockpit2/radios/actuators/com1_frequency_hz", "value": "{value}" } ] }
},
"state": {
"gear_handle": "sim/cockpit2/controls/gear_handle_down",
"flap_ratio": "sim/cockpit2/controls/flap_ratio",
"speedbrake": "sim/cockpit2/controls/speedbrake_ratio",
"parking_brake": "sim/cockpit2/controls/parking_brake_ratio"
}
},
"aircraft": [
{
"_comment": "Zibo 737-800X (B738). Match 'b738' trafia zarowno w kod ICAO (B738) jak i plik b738.acf. Uzywa wlasnych datarefow laminar/B738/*.",
"match": "b738",
"controls": {
"gear_up": { "desc": "Dzwignia podwozia GORA", "ops": [ { "set": "laminar/B738/controls/gear_handle_down", "value": 0 } ] },
"gear_down": { "desc": "Dzwignia podwozia DOL", "ops": [ { "set": "laminar/B738/controls/gear_handle_down", "value": 1 } ] },
"gear_off": { "desc": "Dzwignia podwozia OFF", "ops": [ { "set": "laminar/B738/controls/gear_handle_down", "value": 0.5 } ] },
"flaps_0": { "desc": "Klapy 0 (up)", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.0 } ] },
"flaps_1": { "desc": "Klapy 1", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.125 } ] },
"flaps_2": { "desc": "Klapy 2", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.25 } ] },
"flaps_5": { "desc": "Klapy 5", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.375 } ] },
"flaps_10": { "desc": "Klapy 10", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.5 } ] },
"flaps_15": { "desc": "Klapy 15", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.625 } ] },
"flaps_25": { "desc": "Klapy 25", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.75 } ] },
"flaps_30": { "desc": "Klapy 30", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 0.875 } ] },
"flaps_40": { "desc": "Klapy 40 (full)", "ops": [ { "set": "laminar/B738/flt_ctrls/flap_lever", "value": 1.0 } ] },
"flaps_up": { "desc": "Klapy o jeden stopien do gory", "ops": [ { "cmd": "sim/flight_controls/flaps_up" } ] },
"flaps_down": { "desc": "Klapy o jeden stopien w dol", "ops": [ { "cmd": "sim/flight_controls/flaps_down" } ] },
"ap_on": { "desc": "Autopilot CMD A (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/cmd_a_press" } ] },
"ap_cmd_b": { "desc": "Autopilot CMD B (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/cmd_b_press" } ] },
"autothrottle": { "desc": "Auto-throttle (arm/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/autothrottle_arm_toggle" } ] },
"flight_director": { "desc": "Flight director (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/flight_director_toggle" } ] },
"set_heading": { "desc": "Ustaw kierunek MCP (value=stopnie magnetyczne)", "ops": [ { "set": "laminar/B738/autopilot/mcp_hdg_dial", "value": "{value}" } ] },
"set_altitude": { "desc": "Ustaw wysokosc MCP (value=stopy)", "ops": [ { "set": "laminar/B738/autopilot/mcp_alt_dial", "value": "{value}" } ] },
"set_speed": { "desc": "Ustaw predkosc MCP (value=wezly)", "ops": [ { "set": "laminar/B738/autopilot/mcp_speed_dial_kts", "value": "{value}" } ] },
"set_vs": { "desc": "Ustaw predkosc pionowa MCP (value=fpm)", "ops": [ { "set": "sim/cockpit/autopilot/vertical_velocity", "value": "{value}" } ] },
"lnav": { "desc": "LNAV (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/lnav_press" } ] },
"vnav": { "desc": "VNAV (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/vnav_press" } ] },
"hdg_sel": { "desc": "HDG SEL (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/hdg_sel_press" } ] },
"alt_hld": { "desc": "ALT HLD (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/alt_hld_press" } ] },
"vs_mode": { "desc": "V/S (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/vs_press" } ] },
"lvl_chg": { "desc": "LVL CHG (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/lvl_chg_press" } ] },
"speed_mode": { "desc": "SPEED mode (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/speed_press" } ] },
"app_mode": { "desc": "APP (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/app_press" } ] },
"n1_mode": { "desc": "N1 mode (wlacz/wylacz)", "ops": [ { "cmd": "laminar/B738/autopilot/n1_press" } ] },
"set_course1": { "desc": "Ustaw course CRS1 (value=stopnie)", "ops": [ { "set": "sim/cockpit2/radios/actuators/nav1_obs_deg_mag_pilot", "value": "{value}" } ] }
},
"state": {
"gear_handle": "laminar/B738/controls/gear_handle_down",
"flap_lever": "laminar/B738/flt_ctrls/flap_lever",
"cmd_a": "laminar/B738/autopilot/cmd_a_status",
"autothrottle": "laminar/B738/autopilot/autothrottle_status",
"flight_director": "laminar/B738/autopilot/flight_direct_on",
"lnav": "laminar/B738/autopilot/lnav_status",
"vnav": "laminar/B738/autopilot/vnav_status1",
"hdg_sel": "laminar/B738/autopilot/hdg_sel_status",
"alt_hld": "laminar/B738/autopilot/alt_hld_status",
"vs": "laminar/B738/autopilot/vs_status",
"lvl_chg": "laminar/B738/autopilot/lvl_chg_status",
"app": "laminar/B738/autopilot/app_status",
"n1": "laminar/B738/autopilot/n1_status"
}
},
{
"_comment": "Przyklad: ToLiss Airbus (A319/A321/A340) uzywa wlasnych datarefow AirbusFBW/*.",
"match": "AirbusFBW",
"controls": {
"gear_up": { "desc": "Dzwignia podwozia GORA", "ops": [ { "set": "AirbusFBW/GearLever", "value": 0 } ] },
"gear_down": { "desc": "Dzwignia podwozia DOL", "ops": [ { "set": "AirbusFBW/GearLever", "value": 1 } ] }
},
"state": {
"gear_lever": "AirbusFBW/GearLever"
}
}
]
}