Jump to content
The simFlight Network Forums

aua668

Members
  • Content Count

    276
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by aua668

  1. Hi, There is an error in your routine in line no 14. It's simply not executing: 68453 *** LUA Error: F:\Prepar3D v4\Modules\AlphaYoke.lua:14: malformed number near '294B' Rgds Reinhard
  2. Hi, You could check this link: https://www.flightsim.com/vbfs/showthread.php?261739-multiple-keyboards-using-HID-Macros The only drawback: You should be able to understand the Swedish language 😉 Rgds Reinhard
  3. Hi, No - ipc.readLvar() function reads the Lvars like L:OHD_AC_CTRL_GEN1_SW. here is a list of the variables: L:CPT_CONS_LDG_FLAP_INH_GUARD = 0 L:EFIS_ADC_SRC = 0 L:EFIS_ATTHDG_SRC = 0 L:ENG_LEFT_DOOR_POS = 0 L:ENG_RIGHT_DOOR_POS = 0 L:FC_AILERON_LEFT = -0 L:FC_AILERON_RIGHT = 0 L:FC_COLUMN_LEFT = 50.015181303024 L:FC_COLUMN_RIGHT = 50.015181303024 L:FC_ELEVATOR_LEFT = -14.99771105028 L:FC_ELEVATOR_RIGHT = -14.998748369733 L:FC_FLAPS_LEFT = 0 L:FC_FLAPS_RIGHT = 0 L:FC_GEAR_DOOR_POS_LEFT = 0.5 L:FC_GEAR_DOOR_POS_NOSE = 0.8 L:FC_GEAR_DOOR_POS_RIGHT = 0.5 L:FC_GEAR_LEFT_STRUT = 83.345882343581 L:FC_GEAR_NOSE = 100 L:FC_GEAR_NOSE_STRUT = 85.00757313897 L:FC_GEAR_POS_LEFT = 180 L:FC_GEAR_POS_RIGHT = 180 L:FC_GEAR_RIGHT_STRUT = 83.335765407711 L:FC_NOSE_WHEEL_STEERING = 100 L:FC_PEDALS_LEFT = 49.999848008156 L:FC_PEDALS_RIGHT = 49.999848008156 L:FC_RUDDER = -0 L:FC_SPOILER_LI = 0 L:FC_SPOILER_LO = 0 L:FC_SPOILER_RI = 0 L:FC_SPOILER_RO = 0 L:FC_WHEEL_LEFT = 50.414788722992 L:FC_WHEEL_RIGHT = 50.414788722992 L:Filter = 0 L:FSDT_VAR_Frozen = 0 L:GS_ALTSEL_KNOB_ANGLE = 0 L:GS_ANTISKID_SW = 0 L:GS_CLK1_ARROW_POS = 0 L:GS_CLK1_SELECTOR_POS = 2 L:GS_CLK2_ARROW_POS = 0 L:GS_CLK2_SELECTOR_POS = 2 L:GS_CRS1_KNOB_ANGLE = 100 L:GS_CRS2_KNOB_ANGLE = 100 L:GS_HDG1_KNOB_ANGLE = 0 L:GS_HDG2_KNOB_ANGLE = 0 L:GS_NAV1_KNOB_ANGLE = 14 L:GS_NAV2_KNOB_ANGLE = 21 L:GS_PITCH_WHEEL_ANGLE = 50 L:GS_SPOILERS_SW = 1 L:LastLeftPropPos = 0 L:LastRightPropPos = 0 L:LayerAirports = 0 L:LayerAirspaces = 0 L:LayerCompass = 0 L:LayerILSs = 0 L:LayerIntersections = 0 L:LayerLowAirways = 0 L:LayerNDBs = 0 L:LayerRangeRings = 0 L:LayerTags = 0 L:LayerTerrain = 0 L:LayerVORs = 0 L:MAINPANEL_PUSHBUTTONS = 0 L:MAIN_ALTERNATE_STATIC_POS = 0 L:MAIN_GEAR_HANDLE_POS = 1 L:MAIN_GEAR_HORN_SW = 0 L:MAIN_GEAR_LOCK_POS = 0 L:MAIN_GPWS_FLAP_SLCTR_POS = 0 L:MAIN_INDX1_DH_KNOB_ANGLE = 53 L:MAIN_INDX1_DH_MDA_SW = 0 L:MAIN_INDX1_QNH_KNOB_ANGLE = 59 L:MAIN_INDX1_SPDBUG_KNOB_ANGLE = 67 L:MAIN_INDX2_DH_KNOB_ANGLE = 42 L:MAIN_INDX2_DH_MDA_SW = 0 L:MAIN_INDX2_QNH_KNOB_ANGLE = 79 L:MAIN_INDX2_SPDBUG_KNOB_ANGLE = 69 L:MAIN_STBY_QNH_KNOB_ANGLE = 0 L:MapInit = 0 L:map_ZoomFactor = 0 L:map_ZoomStep = 0 L:MJC_VAR_READ_CODE = 9991999 L:MJC_VAR_READ_VALUE = 0 L:MJC_VAR_WRITE_CODE = 9991999 L:MJC_VAR_WRITE_VALUE = 19400 L:OBS_ADF1_VOL_KNOB = 0 L:OBS_ADF2_VOL_KNOB = 0 L:OBS_AUX1_PB = 0 L:OBS_AUX1_VOL_KNOB = 0 L:OBS_AUX2_PB = 0 L:OBS_AUX2_VOL_KNOB = 0 L:OBS_BOOM_MASK_SW = 0 L:OBS_DME1_VOL_KNOB = 0 L:OBS_DME2_VOL_KNOB = 0 L:OBS_HF_PB = 0 L:OBS_HF_VOL_KNOB = 0 L:OBS_INT_PB = 0 L:OBS_INT_RAD_SW = 0 L:OBS_INT_VOL_KNOB = 0 L:OBS_MKR_VOL_KNOB = 0 L:OBS_VHF1_PB = 0 L:OBS_VHF1_VOL_KNOB = 0 L:OBS_VHF2_PB = 0 L:OBS_VHF2_VOL_KNOB = 0 L:OBS_VOR1_VOL_KNOB = 0 L:OBS_VOR2_VOL_KNOB = 0 L:OBS_VOR_MLS_SW = 0 L:OHD_ACONDPNL_DUCTTEMP_IND_ANGLE = -15 L:OHD_AC_CTRL_EXT_PWR_SW = 0 L:OHD_AC_CTRL_GEN1_SW = 0 L:OHD_AC_CTRL_GEN2_SW = 0 L:OHD_AICE_AFRAME_MAN_KNOB_ANGLE = 0 L:OHD_AICE_AFRAME_MODE_KNOB_ANGLE = 0 L:OHD_AICE_AFRAME_PROPTIMER_KNOB_ANGLE = 0 L:OHD_AICE_BOOT_AIR_SW = 0 L:OHD_AICE_DOOR_PUSHBUTTONS = 0 L:OHD_AICE_ENG_INTAKE_REF_SW = 0 L:OHD_AICE_PITOT_1_SW = 0 L:OHD_AICE_PITOT_2_SW = 0 L:OHD_AICE_PITOT_STBY_SW = 0 L:OHD_AIR_COND_BLEED1_SW = 0 L:OHD_AIR_COND_BLEED2_SW = 0 L:OHD_AIR_COND_BLEED_KNOB = -1 L:OHD_AIR_COND_GAUGE_KNOB = 20 L:OHD_AIR_COND_PACKS1_SW = 0 L:OHD_AIR_COND_PACKS2_SW = 0 L:OHD_AIR_COND_RECIRC_SW = 0 L:OHD_AIR_COND_TEMP_CABIN_KNOB = 49 L:OHD_AIR_COND_TEMP_FCOMP_KNOB = 49 L:OHD_APU_PUSHBUTTONS = 0 L:OHD_CAB_ALT_FWD_OUTFLOW_KNOB = 0 L:OHD_CAB_ALT_LDG_ALT_KNOB = 52 L:OHD_CAB_ALT_MODE_SW = 0 L:OHD_CAB_MAN_OFF_SW = 0 L:OHD_DC_CNTRL_PNL_AUX_SW = 0 L:OHD_DC_CNTRL_PNL_EXTPWR_SW = 0 L:OHD_DC_CNTRL_PNL_GEN1_SW = 0 L:OHD_DC_CNTRL_PNL_GEN2_SW = 0 L:OHD_DC_CNTRL_PNL_MAIN_SW = 0 L:OHD_DC_CNTRL_PNL_MASTER_SW = 0 L:OHD_DC_CNTRL_PNL_RESET_SW = 0 L:OHD_DC_CNTRL_PNL_STB_SW = 0 L:OHD_DC_CNTRL_PNL_TIE_SW = 0 L:OHD_EMER_LT_ARM_SW = 1 L:OHD_EMER_LT_CAUT_BRT_SW = 0 L:OHD_EMER_LT_CAUT_TEST_SW = 0 L:OHD_EMER_LT_FASTEN_BELTS_SW = 0 L:OHD_EMER_LT_NO_SMOKING_SW = 1 L:OHD_ENGSTART_IGN1_KNOB_SW = 1 L:OHD_ENGSTART_IGN2_KNOB_SW = 1 L:OHD_ENGSTART_SELECT_SW = 0 L:OHD_ENG_START_BUTTON = 0 L:OHD_EXT_LIGHTS_L_APPR_SW = 0 L:OHD_EXT_LIGHTS_L_FLARE_SW = 0 L:OHD_EXT_LIGHTS_L_TAXI_SW = 0 L:OHD_EXT_LT_ACOL_SW = 0 L:OHD_EXT_LT_LOGO_SW = 0 L:OHD_EXT_LT_POS_SW = 1 L:OHD_EXT_LT_WING_SW = 0 L:OHD_FDR_GNDTEST_SW = 0 L:OHD_FDR_MODE_SW = 1 L:OHD_FIRE_BAGGAGE_TEST_SW = 0 L:OHD_FIRE_ENG1_EXTH_SW = 0 L:OHD_FIRE_ENG1_PULL_HANDLE = 0 L:OHD_FIRE_ENG2_EXTH_SW = 0 L:OHD_FIRE_ENG2_PULL_HANDLE = 0 L:OHD_FIRE_TEST_DETECTION_SW = 0 L:OHD_PFD_ALT_UNITS_SW = 0 L:OHD_PNL_LIGHTS_CENTER_KNOB_ANGLE = 0 L:OHD_PNL_LIGHTS_DOME_SW = 0 L:OHD_PNL_LIGHTS_ENGPNL_KNOB_ANGLE = 0 L:OHD_PNL_LIGHTS_GLARESHIELD_KNOB_ANGLE = 0 L:OHD_PNL_LIGHTS_OVHD_KNOB_ANGLE = 0 L:OHD_PNL_LIGHTS_STORM_SW = 0 L:OHD_PRESSCOMP_CABALT_IND_ANGLE = 7.15 L:OHD_PRESSCOMP_DIFF_IND_ANGLE = 1.0562358197914e-005 L:OHD_PRESSCOMP_RATE_IND_ANGLE = 50 L:OHD_PRESSPNL_LDGALT_IND_ANGLE = 37.136116 L:OHD_WDO_HEAT_SW = 0 L:OHD_WSHIELD_HEAT_KNOB_ANGLE = 0 L:OHD_WSHIELD_WIPER_KNOB_ANGLE = 1 L:OVH_GUARD_EXT_APU = 0 L:OVH_GUARD_EXT_BGAFT = 0 L:OVH_GUARD_EXT_BGFWD = 0 L:PEDESTAL_PUSHBUTTONS = 0 L:PED_ALT_FTHR_ONE_GUARD = 0 L:PED_ALT_FTHR_TWO_GUARD = 0 L:PED_COM1_FREQ_HI = 50 L:PED_COM1_FREQ_LOW = 40 L:PED_COM1_MODE_KNOB = 0 L:PED_CPT_MFD_BRT_KNOB = 56.250858319982 L:PED_CPT_NAV_SRC_LFT_KNOB = 4 L:PED_CPT_NAV_SRC_RGT_KNOB = 0 L:PED_CPT_PFD_BRT_KNOB = 56.250858319982 L:PED_CPT_RANGE_KNOB = 2 L:PED_CPT_WX_BRT_KNOB = 81.251239795529 L:PED_ED_BRT = 56.250858319982 L:PED_FO_MFD_BRT_KNOB = 56.250858319982 L:PED_FO_NAV_SRC_LFT_KNOB = 4 L:PED_FO_NAV_SRC_RGT_KNOB = 0 L:PED_FO_PFD_BRT_KNOB = 56.250858319982 L:PED_FO_RANGE_KNOB = 2 L:PED_FO_WX_BRT_KNOB = 81.251239795529 L:PED_FUEL_TRANSFER_SWITCH = 0 L:PED_IRS_KNOB = 1 L:PED_MFD1_MODE = 0 L:PED_PITCH_HANDLE = 0 L:PED_ROLL_DISC_HANDLE = 0 L:PED_TRIM_AILERON_SW = 0 L:PED_TRIM_RUDDER_KNOB = 0 L:PED_WR_GAIN = 0.0016212710737955 L:PED_WR_MODE = 0 L:PED_WR_TILT = 0 L:PFD_MFD2_MODE = 1 L:PLANEHEADINGDEGREESGYRO = 0 L:PROP_LEFT_BLADES_ANGLE = 43.275265038013 L:PROP_LEFT_DISK_VISUAL_ANGLE = 0.76904296875 L:PROP_LEFT_RPM = 0 L:PROP_RIGHT_BLADES_ANGLE = 43.275265038013 L:PROP_RIGHT_DISK_VISUAL_ANGLE = 0.1495361328125 L:PROP_RIGHT_RPM = 0 L:Q400_2PILOT_HEAD = -15 L:Q400_2PILOT_POS = 0 L:Q400_AILERON_TRIM_IND_ANGLE = 0 L:Q400_ALT_LG_EXT_COVER = 0 L:Q400_ALT_LG_EXT_HANDLE = 0 L:Q400_ALT_LG_FLOOR_HANDLE = 0 L:Q400_AP_DISENGAGE_KNOB = 0 L:Q400_BEACON_SPLASH = 0 L:Q400_BIRD_STRIKE = 0 L:Q400_CAMERA_PERSPECTIVE = 1 L:Q400_COND_LEVER_1 = 0 L:Q400_COND_LEVER_2 = 0 L:Q400_CONTROL_LOCK = 100 L:Q400_DOMELIGHT = 0 L:Q400_ELEVATOR_TRIM_IND_ANGLE = 99.607843137255 L:Q400_EMER_HATCH = 0 L:Q400_FIRE = 0 L:Q400_FIRE_COCKPIT = 0 L:Q400_FLAP_POS = 0 L:Q400_FLARELIGHT = 0 L:Q400_FUELFLOW_PPH_L = 0 L:Q400_FUELFLOW_PPH_R = 0 L:Q400_FWD_WHEEL = 68.006361624844 L:Q400_GEAR_LEFT_RPM = 0 L:Q400_GEAR_LOCK_PIN_IN = 1 L:Q400_GEAR_NOSE_RPM = 0 L:Q400_GEAR_RIGHT_RPM = 0 L:Q400_GFORCE_FPS = -32.144016132336 L:Q400_GPU_VISIBLE = 1 L:Q400_HUD = 0 L:Q400_HUD_BRIGHTNESS = 100 L:Q400_ICING_LEVEL_INTAKES = 0 L:Q400_ICING_LEVEL_NO_DEICE = 0 L:Q400_ICING_LEVEL_SIDE_WINDOW = 0 L:Q400_ICING_LEVEL_TAIL = 0 L:Q400_ICING_LEVEL_WINDSHIELD = 0 L:Q400_ICING_LEVEL_WINGS = 0 L:Q400_LANDLIGHT = 0 L:Q400_LAND_LTST = 0 L:Q400_LEFT_WHEEL = 18.554237379552 L:Q400_LEVER_ANTIMIST = 0 L:Q400_LG_DNLOCK_VER_SWITCH = 0 L:Q400_LG_DN_SEL_INH_GUARD = 0 L:Q400_LG_DN_SEL_INH_SWITCH = 0 L:Q400_LIGHTTAXI = 0 L:Q400_LOW_VENT_HANDLE = 0 L:Q400_LT_FUSES_LEFT_LT = 0 L:Q400_LT_FUSES_RIGHT_LT = 0 L:Q400_LT_HALL_LT = 0 L:Q400_LT_HALL_SW = 0 L:Q400_LT_MAP_LEFT_LT = 0 L:Q400_LT_MAP_LEFT_SW = 0 L:Q400_LT_MAP_RIGHT_LT = 0 L:Q400_LT_MAP_RIGHT_SW = 0 L:Q400_LT_PILOT_LEFT_LT = 0 L:Q400_LT_PILOT_LEFT_SW = 0 L:Q400_LT_PILOT_RIGHT_LT = 0 L:Q400_LT_PILOT_RIGHT_SW = 0 L:Q400_MAN_GEAR_EXT_HANDLE = 0 L:Q400_MAN_GEAR_EXT_READY = 0 L:Q400_MIST_COPILOTWIN_LEVEL = 7 L:Q400_MIST_PILOTWIN_LEVEL = 0 L:Q400_MIST_WINDSHIELD_LEVEL = 0 L:Q400_NAV_LIGHTS = 0 L:Q400_PILOT_HEAD = 0 L:Q400_PILOT_POS = 0 L:Q400_PITOT_ISOL_VALVE_GUARD = 0 L:Q400_POWER_LEVER_1 = 46.35498046875 L:Q400_POWER_LEVER_2 = 49.69623613931 L:Q400_PROP_LEFT_RPM = 0 L:Q400_PROP_RIGHT_RPM = 0 L:Q400_RAIN_FRAMES = 0 L:Q400_RIGHT_WHEEL = 18.575972976864 L:Q400_RUDDER_TRIM_IND_ANGLE = 0 L:Q400_SIDE_RIGHT_TABLET = 0 L:Q400_SIDE_TABLET = 0 L:Q400_STEERING_TILLER = 56.628936767578 L:Q400_STROBELIGHT_DN = 0 L:Q400_STROBELIGHT_UP = 0 L:Q400_SUN_SHIELD_LEFT = 0 L:Q400_SUN_SHIELD_RIGHT = 0 L:Q400_TYRE_BLOWN_LEFT = 0 L:Q400_TYRE_BLOWN_RIGHT = 0 L:Q400_WINGLIGHT = 0 L:Q400_WIPER_ANGLE = 0 L:Q400_WIPER_RIGHT_ANGLE = 0 L:Q400_YOKE_VISIBILITY = 255 L:RADIO1_ADF1_KNOB = 0 L:RADIO1_ADF2_KNOB = 0 L:RADIO1_AUX1_KNOB = 0 L:RADIO1_AUX2_KNOB = 0 L:RADIO1_BOOM_MASK_SW = 0 L:RADIO1_CENTRAL_KNOB = 0 L:RADIO1_DME1_KNOB = 0 L:RADIO1_DME2_KNOB = 0 L:RADIO1_HF_KNOB = 0 L:RADIO1_HOT_MIC_SW = 0 L:RADIO1_MKR_KNOB = 0 L:RADIO1_NORM_EMER_SW = 0 L:RADIO1_SERV_INT_KNOB = 25.001525972044 L:RADIO1_SPKR_KNOB = 0 L:RADIO1_SRC_SELECTOR = 0 L:RADIO1_TUNE_HIGH = 23 L:RADIO1_TUNE_LOW = 67 L:RADIO1_VHF1_KNOB = 0 L:RADIO1_VHF2_KNOB = 0 L:RADIO1_VOR1_KNOB = 0 L:RADIO1_VOR2_KNOB = 0 L:RADIO2_ADF1_KNOB = 0 L:RADIO2_ADF2_KNOB = 0 L:RADIO2_AUX1_KNOB = 0 L:RADIO2_AUX2_KNOB = 0 L:RADIO2_BOOM_MASK_SW = 0 L:RADIO2_CENTRAL_KNOB = 0 L:RADIO2_DME1_KNOB = 0 L:RADIO2_DME2_KNOB = 0 L:RADIO2_HF_KNOB = 0 L:RADIO2_HOT_MIC_SW = 0 L:RADIO2_MKR_KNOB = 0 L:RADIO2_NORM_EMER_SW = 0 L:RADIO2_SERV_INT_KNOB = 25.001525972044 L:RADIO2_SPKR_KNOB = 0 L:RADIO2_SRC_SELECTOR = 0 L:RADIO2_TUNE_HIGH = 50 L:RADIO2_TUNE_LOW = 50 L:RADIO2_VHF1_KNOB = 0 L:RADIO2_VHF2_KNOB = 0 L:RADIO2_VOR1_KNOB = 0 L:RADIO2_VOR2_KNOB = 0 L:seatFO = 0 L:seatKVS = 0 L:SIDE_PNL_ADC_TEST = 0 L:SIDE_PNL_CIRC_BRK_LT = 0 L:SIDE_PNL_FLT_PNL_BRT = 0 L:SIDE_PNL_FO_CIRC_BRK_LT = 0 L:SIDE_PNL_FO_DEICE1_IND_ANGLE = 0 L:SIDE_PNL_FO_DEICE2_IND_ANGLE = 0 L:SIDE_PNL_FO_FLT_PNL_BRT = 0 L:SIDE_PNL_FO_OXYGEN_IND_ANGLE = 90 L:SIDE_PNL_INPH_XMIT = 0 L:SIDE_PNL_PROP_OSG = 0 L:SIDE_PNL_STALL_WARN_TEST = 0 L:SIDE_PNL_STEERING = 0 L:SIDE_PNL_TO_WARN = 0 L:SMOKE3STATE = 0 L:SMOKE4STATE = 0 L:SMOKE59STATE = 0 L:SPNL_FORWARD_OUTFLOW_VALVE_GUARD = 0 L:SPNL_FWD_OUTFLOW_VALVE = 0 L:VehicleObjectDetail = 0 The variables in the supplied XLS-Sheet must be handled via the XML-interface. Rgds Reinhard
  4. Hi, Thanks for sharing your work. Seeing that amount of outputs, it would be better to implement this with the upcoming training edition, which will include much more efficient interfaces for cockpit builders. Great work! Rgds Reinhard PS: And don't ask me, when the training edition will be available 😉
  5. Hi, As I wrote: Yes I use those output variables, which I need for my hardware. Most of the directly via Lvars and some of them via the XML-interface. Rgds Reinhard
  6. Hi, Yes - I have them in sync. Either they are readable from Lvars (you can react on changes with the event.Lvar trigger) or I collect them permanently via the XML interface. As the interface doesn't react very quickly, you have a latency of some msec. Rgds Reinhard
  7. Hi, I just saw, that I did not include the ZIP file. Sorry! Reinhard Q400_Write_XML_IF.zip
  8. Hi, In the included ZIP-File I added two files: One is a definition file for the XML-functions I use with my hardware. The numbers I got from the provided utility, which calculates the hash value for the specific variable. The second file is a sample module, which toggles the TOGA button. For every button I have such a routine. In a master file, which is automatically started, I start all my modules for the Q400 with ipc.runlua("<<<modulename>>>") For reading values from the XML interface I use one single module transferring all the necessary XML-Values into global variables, which later I can use in different modules. The core of the routine can be seen here: -- initialize XML interface to HW function readXMLIF ( pFunc ) -- function to read specific IF value local lMJC_readCode local lMJC_readValue local lCount = 0 -- select function by hash code ipc.writeLvar("L:MJC_VAR_READ_CODE", pFunc) ipc.sleep(5) -- read results lMJC_readCode = ipc.readLvar("L:MJC_VAR_READ_CODE") -- wait if not ready while lMJC_readCode ~= 9991999 and lMJC_readCode ~= 9992999 and lCount < 20 do lCount = lCount + 1 ipc.sleep(10) lMJC_readCode = ipc.readLvar("L:MJC_VAR_READ_CODE") end if lMJC_readCode == 9991999 then lMJC_readValue = ipc.readLvar("L:MJC_VAR_READ_VALUE") -- success else lMJC_readValue = 9992999 -- variable not found ipc.log("Error reading MJC interface for function "..pFunc) end return lMJC_readValue -- return value or error end function readAllXMLValues() -- synchronize global variables from Q400 values -- autopilot ipc.set ("Q400_YD_LIGHT" , readXMLIF ( 31461 ) ) -- AFCS_->outputs.YD_engaged ipc.set ("Q400_AP_LIGHT" , readXMLIF ( 31281 ) ) -- AFCS_->outputs.AP_engaged -- glare shield ipc.set ("Q400_CAUTION" , readXMLIF ( 143090 ) ) -- CautionWarning_->outs_.master_caution_light_blinking ipc.set ("Q400_WARNING" , readXMLIF ( 143112 ) ) -- CautionWarning_->outs_.master_warning_light_blinking -- fuel ipc.set ("Q400_AUX_FUEL" , readXMLIF ( 59590 ) ) -- Fuel_->systems[0].AuxFuelPumplight -- Autofeather ipc.set ("Q400_AUTO_FEATHER" , readXMLIF ( 41047 ) ) -- PCU_->AutofeatherSelectLight -- Hydraulic ipc.set ("Q400_HYDRAULIC" , readXMLIF ( 91735 ) ) -- Hydraulical_->outs_.stby_hydr_ON_indicator end while 0 < 1 do readAllXMLValues() ipc.sleep(50) end The reason, why I read all the values at once in one single module is, that the interface always fetches one single value at one time. If you would call it from several independent threads, the calls could interfere. This is a limitation of the current XML interface. The training edition will include a more sophisticated interface. Luckily most of the values can be read directly out of Lvars and you can avoid the XML-Interface. So a simple ipc.readLvar("<<<variable name>>>") will provide you the value directly. If you have no programming skills, it's hard. Maybe you find some student nearby, which helps you with that part. You can offer him later some simulator hours 😉 Rgds Reinhard
  9. Hi, If you use only FSUIPC for your assignments, you could eliminate all assignments of the P3D control configuration file with an editor and make it afterwards read-only. Then no automatically added assignments to axis, buttons, etc. will happen anymore. I am currently not at my PC but I think it should be here: %APPDATA%\Lockheed Martin\Prepar3D\Controls\Standard.xml Rgds Reinhard
  10. Hi, I am not aware, that this is possible. But you can save a scenario with undocked panels. Then start your flight with that scenario and the panels are undocked. You can hide/unhide the panels per LUA code. Rgds Reinhard
  11. Hi, I just found in the SPAD documentation: So you can map your hardware to virtual joystick buttons, which you then could map to LUA actions (or check them via the event library in your LUA scripts, which is the preferred method to implement such functions). Rgds Reinhard
  12. Hi, I don't own and use SPAD.next. I use GoFlight hardware - so the buttons and switches are visible in FSUIPC directly. In LUA scripts I am listening to these button events and I trigger the necessary activities to set or to get the values in the Q400 via the XML interface. According to your plan, to map these actions to keyboard events in SPAD.next, you could then assign the LUA actions in FSUIPC to these keyboard events. But strange, that you are not able to see these events directly in FSUIPC. But as I don't own this type of hard- and software, I can't help you in that topic in detail. The XML interface is obviously bound to the Pro version. So an upgrade is necessary. The upcoming training edition will get additional interface options for cockpit builders. But no clue, when it will be available. Typically this time frame is two weeks 😉 The Pro version has some nice additional features (eg the 125Hz control of the main input axis). Q400 version comparison Rgds Reinhard
  13. Hi, You need to write a small program in LUA to get values from the output variables. The best source to start is to check, how this was implemented in the Q400 module of LINDA (great SW by the way - check AVSIM for it). There you will find a lot of source code, reading output values from the Q400. LINDA Forum In short words: You have to find out the hash value of the variable with the supplied tool. Then you set a specific Lvar with the hash value and you will get the return value in another specific Lvar. This procedure is documented in a ReadMe file supplied with the Q400. Rgds Reinhard
  14. Alessandro, For interfacing to the Q400 you should use the XML interface documented by Majestic. This means a little bit LUA programming but by that method you are able to access all Q400 functions. Check your Q400 documentation folder. Mouse macros are not working well, as parts of the panel are not using the standard SDK and by that not all functions can be trapped by the mouse macro option. So check the XML interface. I am not sure, if this requires the Pro version, which I use, or if it is already included in the Pilot edition. Rgds Reinhard
  15. Hi, You can use the XML-Interface as documented by Majestic. It works in FSUIPC5 without any problem. So follow the documentation and you can access all variables. Rgds Reinhard
  16. Hi, Assign them on the button tab of FSUIPC. Page 26 of the FSUIPC User Guide shows you the dialog. Rgds Reinhard
  17. Hi, How are your switches connected to the simulator? Are they recognized as normal buttons? In that case you simply can assign the appropriate controls to it without LUA programming (TOGGLE_TAXI_LIGHTS, LANDING_LIGHTS_TOGGLE). Rgds Reinhard
  18. Hi, Here is my configuration I used for the C750 from Eaglesoft when I have been on P3D v3: [Axes] : 5=GY,128,F,66420,0,0,0 -{ TO SIM: AXIS_THROTTLE1_SET }- 6=GY,B,-16384,-8000,x010066D5,x01,x010066D5,x00 -{ TO SIM: AXIS_THROTTLE1_SETEntering=offset byte set, offset 66D5, Leaving=offset byte set, offset 66D5 }- 7=GZ,128,F,66423,0,0,0 -{ TO SIM: AXIS_THROTTLE2_SET }- 8=GZ,B,-16384,-8000,x010066D6,x01,x010066D6,x00 -{ TO SIM: AXIS_THROTTLE2_SETEntering=offset byte set, offset 66D6, Leaving=offset byte set, offset 66D6 }- : [Buttons] : 2=B66D5=1 RG,3,C65966,0 -{THROTTLE1_DECR}- 3=B66D5=1 UG,3,C65967,0 -{THROTTLE1_CUT}- 4=B66D6=1 RG,2,C65971,0 -{THROTTLE2_DECR}- 5=B66D6=1 UG,2,C65972,0 -{THROTTLE2_CUT}- : So I triggered a change in a user offset 0x66D5 and 0x66D6, when I entered a special zone with the throttle. This again was used in a conditional button to trigger and release the rvereser. In the advanced user manual you find more details about this type of tricky button programming. This was with GoFlight hardware, which has reverser buttons if you move some levers towards the throttle. As this should only happen if you are in the idle area (and not inflight), this trick was necessary. Maybe this helps you to solve your problem or point you toward a solution. Rgds Reinhard
  19. Hi, There was a tool available at http://www.wingmanteam.com/files/Tools/Caffeine/Caffeine.exe fixing this problem for the Logitech cordless joystick. The site isn't available any longer. Maybe you find another source. But don't mix it up with a similar program with the same name, which is keeping your PC alive. This version was especially programmed for the Logitech joystick. Rgds Reinhard
  20. Hi, I am not at home at the moment but as far as I remember, you have to send the axis directly to FS (bypassing FSUIPC) for the ESDG Citation X. It's the second option to select. Rgds Reinhard
  21. Hi, You could define two axis ranges. One in the upper range (e.g. 8000 .. 16383) firing the "GEAR UP" control when entering, and one in the lower range (e.g. -16384 .. -8000) firing the "GEAR DOWN" control when entering this range. You have to use the right side of the dialog box in the axis assignment. Rgds Reinhard
  22. Hi, I have programmed some time ago a small LUA program, which reads for me checklist items. I used the program saystatic.exe , which can be found on GITHUB: https://github.com/albertly/Say/blob/master/SayStatic.exe With the following function I read text, which I provide as parameterto th function: -- read string via sound device function readItem(lvString) ext.run("C:\\Program Files (x86)\\WideFS\\SayStatic.exe", lvString, EXT_HIDE) end Maybe this helps you. Rgds Reinhard
  23. Hi, Sorry for answering late but I was skiing in the Alps. Assigning LUA routines to buttons by assigning them via the button tab is not very efficient. If you do it like that, every time you activate one of your buttons, the LUA code must be loaded, compiled and then be executed. You really should look for the event library in the LUA library document. Using that method you only have to load the LUA modules once (maybe via the autoload functionality built into FSUIPC). Then these routines are waiting for the trigger events you have defined and execute the referenced function. Much more efficient to do it that way. Rgds Reinhard
  24. Hi, I made the experience, that having more smaller scripts with only a few event routines performs better than having all of the code in one single LUA file. While you would not see this effect on simple buttons, you will see it on rotaries. Maybe this helps you. And a smaller code segment is easier to debug than a big one - at least for me. Rgds Reinhard
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.