The following code writes to the XP dataref file.
xpl_dataref_write("sim/cockpit2/parking_brake_ratio", "FLOAT", 1)
xpl_dataref_write("sim/cockpit2/parking_brake_ratio", "FLOAT", 0)
I would like to write to this dataref in a KnobXP mode json file.
Does anyone know if the above code can be written in the json syntax?
I have tried many different combinations but have been unable to find the right syntax
I will continue to try and find the right syntax but I may be wasting my time if this
code cannot be written in the json syntax
jSON Syntax for KnobXP
Re: jSON Syntax for KnobXP
I am afraid that only commands can be used in the JSON file.
But your datarefs can probably be replaced by the adequate XPl command instead, since the action you seem want to achieve is to set the parking brake, correct?
{
"name": "Parking Brake",
"minor_cw_cmd": "",
"minor_ccw_cmd": "",
"major_cw_cmd": "",
"major_ccw_cmd": "",
"button_released_cmd": "sim/flight_controls/brakes_toggle_max",
"order": 301500
}
Use whatever order number is fit to enter the list
-----------------------------
As a side note: this forum like nearly all the others is filled with REAL people.
In real life, you would likely never enter a room full of strangers and ask a question out loud without, you know, those little words which are “hello, thank you, please”, unless being considered as rude, and at best be simply ignored.
There is no difference here.
Thank you for taking this into account, this forum is NOT ChatGPT
But your datarefs can probably be replaced by the adequate XPl command instead, since the action you seem want to achieve is to set the parking brake, correct?
{
"name": "Parking Brake",
"minor_cw_cmd": "",
"minor_ccw_cmd": "",
"major_cw_cmd": "",
"major_ccw_cmd": "",
"button_released_cmd": "sim/flight_controls/brakes_toggle_max",
"order": 301500
}
Use whatever order number is fit to enter the list
-----------------------------
As a side note: this forum like nearly all the others is filled with REAL people.
In real life, you would likely never enter a room full of strangers and ask a question out loud without, you know, those little words which are “hello, thank you, please”, unless being considered as rude, and at best be simply ignored.
There is no difference here.
Thank you for taking this into account, this forum is NOT ChatGPT
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
Re: jSON Syntax for KnobXP
JackZ
Thank you for the information that only commands can be used in JSON files. I had already spent a lot of time trying to input the datarefs into the JSON file.
I have been slowly learning the JSON file formats for both X-Plane an MSFS. You have saved me from wasting a lot of time. I am also new to forums and will
remember to use the proper etiquette when posting.
Thank you for the information that only commands can be used in JSON files. I had already spent a lot of time trying to input the datarefs into the JSON file.
I have been slowly learning the JSON file formats for both X-Plane an MSFS. You have saved me from wasting a lot of time. I am also new to forums and will
remember to use the proper etiquette when posting.