Jump to content

huha001

Members
  • Content Count

    21
  • Donations

    $0.00 
  • Joined

  • Last visited

Everything posted by huha001

  1. I got a lot of help of the AAO developer when i started developing my own gauges and wanted to summarize that in this tutorial for others. The new layout editor of AAO makes it a lot easier to start without any knowledge and this tutorial is describing step by step how to use it. It is thought for people who are designing their first gauge or are beginners with little or no knowledge about creating 2D cockpit gauges. You will first learn with a dummy Test-Gauge-Example all functions of the AAO layout editor. Next some simple example gauges are describing base techniques to create gauges. The zip file contains all images needed for that. Have fun to try it yourself! It is available now at flightsim.to https://de.flightsim.to/file/58848/aao-gauge-layout-editor-tutorial-for-beginners
  2. Thank you so much for your help! With this example i understand now the webapi.yaml file and got also other calls working. This is great!
  3. First of all a big thanks for the wonderful program! I am using the Webserver and I succeeded to write my first server page and can control now a LNM map with Axis and Ohs using an Xtouch Mini Controller. The test.html example was very helpful. The only question l have is if there is a way to get the airport information as .json object from the server. I saw a docu for an api interface in the web folder but was not successful to use it. I tried http://localhost:8965/api/airport/info?name=eddm Or is there a way to send a .json sql query object to the server to get information from the sqlite database via the server? Any help in form of an example would be very much appreciated.
  4. Just want to post one item which did cost me some time to find out: If you want to use the following SHIFT combinations with virtual keys in AAO you must turn off the numpad or it will not work and you will get the function of the numpad keys. SHIFT LEFT SHIFT RIGHT SHIFT UP SHIFT DOWN SHIFT POS1 SHIFT END SHIFT PAGEUP SHIFT PAGEDN SHIFT INSERT SHIFT DELETE This is only for a combination with the SHIFT key, all other worked also with the numpad turned on. This is not related to AAO, but how the virtual keys are processed.
  5. Hi colmoschin94, I just posted a HowTo on sending vitrtual keys to another computer. This is working for me toggling the active Pause on my networked computer. It is not easy, but allows me now to send any key command to a networked computer via VB scripting.
  6. I want to share a solution how to send virtual keys to another computer if you are running AAO and FS2020 on different computers: This can be used to send all the "nonworking" Simevents of the Asobo SDK like Toggle Pause , Toggle ATC window, or VIEW and CAMERA events via key strokes to another computer You need to attach with ONCE this initialization script to aircraft automated scripts, where you can direct the virtual keys either to the same computer or to a networked computer by macros: //·Use·0·if·FS2020·runs·on·the·same·computer·like·AAO //0·(>L:AAO_ON_OTHER_COMPUTER)· //·Use·1·if·FS2020·runs·on·a·different·computer·like·AAO 1·(>L:AAO_ON_OTHER_COMPUTER)· //In·that·case·the·IP·address·and·the·AAO·WebAPI·port·must·be·specified·for·the·FS2020·computer: '192.168.178.29:9080'·(>L:FS2020_IP_ADDRESS_PORT,·String)· //Location·of·the·.vbs·script·to·send·commands·to·the·FS2002·computer 'C:\Users\<username>\Documents\LorbyAxisAndOhs·Files\Scripts\huha001-Cessna152\VB_Scripts\SendAAOScript.vbs'·(>L:VB_SCRIPT_FILE,·String) (SPLIT:100) //Define·the·generic·(SPLIT:100) '(SPLIT·:·100)·'··(>L:SPLIT,·String) //Define·the·generic·command·string·variable·part1:·and·store·in·(L:VBS_SEND_MACRO,·String) '·'·(>L:VBS_SEND_MACRO1,·String)· '(EXEC:wscript.exe,·"'·(L:VB_SCRIPT_FILE,·String)·scat· '"·"'·scat· (L:FS2020_IP_ADDRESS_PORT,·String)·scat· '"·"'·scat·(>L:VBS_SEND_MACRO1,·String) //Define·the·generic·command·string·variable·part2 '")'·(>L:VBS_SEND_MACRO2,·String) //switch now depending on L:AAO_ON_OTHER_COMPUTER the configuration of the macro with local variables (L:AAO_ON_OTHER_COMPUTER)·0·==·if{ '·'·(>L:VBS_SEND_MACRO1,·String) '·'·(>L:VBS_SEND_MACRO2,·String) //Define·the·real·(SPLIT:100) '(SPLIT'·':100)·'·scat·(>L:SPLIT,·String) } You have to replace your user account name <username> and ip address of the FS2020 computer and to check all your paths. Then you can use the following VB script which must be in C:\Users\<username>\Documents\LorbyAxisAndOhs·Files\Scripts\huha001-Cessna152\VB_Scripts\SendAAOScript.vbs : '*********************************************************************************************** ' .vbs script to send an AAO script sequence to the Fs2020 computer via the AAO webinterface '*********************************************************************************************** ' Version 1.0 ' AAO must be run offline in admin mode on the FS2020 computer with the WEB API enabled ' The windows firewall must have a rule defined for both the FS2020 and the AAO computer ' Call: wscript.exe SendAAOScript.vbs ' Store the arguments in a variable: ' ipaddress: ipaddress of the FS2020 computer with the AAO port number (example: localhost:9080 or 192.168.178.27:9080) ' scriptvar: string with AAO script sequence being executed on the FS2020 computer (example: "99 (>L:MYDEBUGVAR)" Dim o, scriptVar,ipaddress, debug On Error Resume Next debug = True ipaddress = "" scriptVar = "" 'DEBUG: If debug Then Set objFSO=CreateObject("Scripting.FileSystemObject") 'INSTALLER_CHANGE_BEGIN outFile="C:\Users\<username>\Documents\LorbyAxisAndOhs Files\Scripts\huha001-Cessna152\VB_Scripts\logfile.txt" 'INSTALL_CHANGE_END Set objFile = objFSO.CreateTextFile(outFile,True) objFile.Write "count=" & Wscript.Arguments.Count & vbCrLf End If If Wscript.Arguments.Count > 0 then ipaddress = Replace(Wscript.Arguments(0),"&gt;",">") end if ' you must replace > and < and : and probably a few more for all script commands if Wscript.Arguments.Count > 1 then scriptVar = Replace(Wscript.Arguments(1),"&gt;",">") scriptVar = Replace(scriptVar,"&lt;",">") scriptVar = Replace(scriptVar,"&colon;",":") scriptVar = Replace(scriptVar," : ",":") end if 'send the script now to the Fs2020 computer Set o = CreateObject("MSXML2.XMLHTTP") o.open "POST", "http://" & ipaddress & "/webapi?json={""scripts"": [ { ""code"":"" " & scriptVar & " "" }]}", False o.send If Err.Number <> 0 Then If debug Then objFile.Write "ipaddress=" & ipaddress & vbCrLf objFile.Write "scriptVar=" & scriptVar & vbCrLf objFile.Write "There's been an error sending the http request to the AAO webserver" & vbCrLf objFile.Write "Is the AAO WEBAPI enabled and is AAO running in Admin mode?" & vbCrLf objFile.Close WScript.Quit 1 End If End IF ' o.responseText now holds the response as a string. 'you could access with a running .vbs script to AAO via the WEB interface for simvars or also send via .vbs scripts events to AAO 'DEBUG: if debug Then objFile.Write "ipaddress=" & ipaddress & vbCrLf objFile.Write "scriptVar=" & scriptVar & vbCrLf objFile.Write "responseText=" & o.responseText & vbCrLf objFile.Close End If Last, the virtual key is then sent by a RPN script just with a single line depending on your configuration in the initialization script either directly on the same computer or via vb script to another computer: //************************************************************************** //·Script·for·Virtual·Keys·for·PAUSE //************************************************************************** //·Virtual·Key:·Pause @VBS_SEND_MACRO1·(FOCUS:flightsimulator)·@SPLIT·(VKD:69-197-19)·@SPLIT·(VKU:69-197-19)·@VBS_SEND_MACRO2 Explanations: The main idea is that you are sending by macro definitions the virtual key(s) either directly to the same computer or via a VB script to another computer using the AAO webinterface. For that AAO must run on the Fs2020 computer in admin mode without being connected to the Fs2020 computer in the offline modus. This instance of AAO just receives via the webinterface virtual key commands from the AAO computer. Please note that you must define separate @SPLIT macros, because AAO does not allow within a String the SPLIT command (or any other simulation variable!!!). AAO would execute it as a command or replace the simvariable by its value. Then the macro definitions start in an EXEC command the VB script with the virtual key commands as an argument. The VB script removes the spaces before and after the colon (which prevents AAO to execute the Split command from the string) and sends via http request the virtual script command to the other computer via the AAO webinterface Most of the script is just for debugging and could be removed. Needless to say that this concept of starting VB scripts via AAO with arguments, VB script processing and transferring back the results to AAO via the Web interface enables a lot more complex procesing opportunities. I know this is complicated but you can watch the execution depending on the configuration in the 'Watch AAO Script processing' window step by step.
  7. Thanks a lot for your help! I also want to say thanks for what you did in the previous versions with the xml panels for desktop and web-fips. This gave so many new options with the program.
  8. I tried in a xml gauge for my Cessna 152 Xtouch Mini project at https://flightsim.to/file/32189/cessna-152-template-and-gauge-for-behringer-xtouch-mini-and-axis-and-ohs-aao to display the content of a string, but did not succeed. Is there a way or a specific format to do that? I tried formatting with <Value>%(L:ACTION, String)%!30s!</Value> and <Value>%(L:ACTION, String)%!s!</Value> but could not get it to work.
  9. It looks like import/export scripts does not include the <edition> tag for formatting scripts and including comments. This does work for exporting/importing templates, but not for scripts. Is that something which could be added in the future?
  10. Thanks for the clarification and the link. I was interested in the altimeter and needles .png files, but will make my own now. Good news for me was that i can use the screws and instrument panel from the AAO site.
  11. I do have 2 questions on my first gauge design: 1) Are your AAO gauges copyright proteced or can users reuse/modify them and publish on flightsim.to? 2) Does AAO support grouping of elements? This would enable a more performance friendly programming of the visible property based on groups. The general syntax of elements does enable nesting, but when i tried, it did not work or I used the wrong format.
  12. Wow, I was always hoping someone would discover that at some day. touchdown 84, the modus can be set on the active layer by the cc command. The following test script sumarizes all the combinations I found but without outputting your value it did not make sense before. I have not found a modus where the LEDs can be completely turned off. //velocity·(>MIDI:<DeviceId>:<Action>:<channel>:<note>) //<Action>·can be one of the following: „NoteOn“, „NoteOff“, „CC“, „PrgChng //Encoder 1 Modus single LED with no LEDs at value 0 // values larger than the maximum value or smaller than the minimum value will // result in no LEDs // Only the modus of the active layer will be changed 0 (>MIDI:3:CC:1:1) //Output values //0 (>MIDI:3:CC:11:1) 30 (>MIDI:3:CC:11:1) //127 (>MIDI:3:CC:11:1) //Encoder 2 Modus single LED with first LEDs at value 0 // values larger than the maximum value or smaller than the minimum value will // result in the first LEDs 1 (>MIDI:3:CC:1:2) //Output values //0 (>MIDI:3:CC:11:2) 60 (>MIDI:3:CC:11:2) //127 (>MIDI:3:CC:11:2) //Encoder 3 Modus FAN, LEDS increasing from 0 to 13 LEDs with value // 0 is no LEDs and 127 is all LEDs 2 (>MIDI:3:CC:1:3) //Output values //0 (>MIDI:3:CC:11:3) 60 (>MIDI:3:CC:11:3) //127 (>MIDI:3:CC:11:3) //Encoder 4 Modus PAN, symmetric increase of LEDS left and right of LED 7 // 0 is LED 7, 127 all LEDs 3 (>MIDI:3:CC:1:4) //Output values //0 (>MIDI:3:CC:11:4) //30 (>MIDI:3:CC:11:4) 127 (>MIDI:3:CC:11:4) //Encoder 5 Modus TRIM, // 0 is left half of LED ring, 127 is right half of LED ring 4 (>MIDI:3:CC:1:5) //Output values //0 (>MIDI:3:CC:11:5) //90 (>MIDI:3:CC:11:5) 127 (>MIDI:3:CC:11:5) //Other comnmands //Goto Layer A //0 (>MIDI:3:PrgChng:1) //Goto Layer B //1 (>MIDI:3:PrgChng:1) // Fake LEDs: 0 off, 1-13 on, 14-26 blink, 27 all on, 28 all blinking // Device id:3, Global channel 1, Encoder 1 // Encoder 1 all LEDs blinking //28 (>MIDI:3:CC:1:09) //LED Button 2 on layer A 1 (>MIDI:3:NoteOn:11:09)
  13. So it all existed already in AAO (thanks a lot to Oliver for his help). Attached I am showing an example for other newbies: Below is a simple script to swap the COM or NAV frequency defined by param1 and flash the xtouch mini LED encoder ring (param2) for 100ms. ----------------------------------------------------------------------------------------------------- //Swap Active and standby frequency for a long click and flash all LEDs on xtouch mini //param1 event to swap frequencies e.g. K:COM1_RADIO_SWAP //param2 Encoder led ring e.g. MIDI:3:CC:1:9 //flash encoder LED ring on xtouch mini 27 (>param2) 1 (>param1) (WAIT:100) //turn off encoder LED ring on xtouch mini 0 (>param2) ----------------------------------------------------------------------------------------------------- This script can now be called from a test script in C:\Users\your_user_name\Documents\LorbyAxisAndOhs Files\Scripts\DebugParams.txt by starting it from the AAO window: Scripting -> Run Script Files It replaces the params by the actual values. The "select scripts to run" window allows to choose a line number to start the script which I am using for the different combinations of params. Before starting the script I export all variables. This exports all variables from the AAO cache with the value into a file myvariables.tsv. After the :END label I am waiting 300ms as scripts are always executed in a separate task and then I am writing the changes of variables (AAO will save two columns of numbers) into another file changes.tsv. Before starting from different line numbers, you need to make sure that all the replaced variables are in the AAO cache and have been written to myvariables.tsv once. In the future this export will no more be needed as Oliver is doing great work on better debug support right now. Testscript for params: ----------------------------------------------------------------------------------------------------- // Debug script for params which can be started from the menu item: Scripting -> Run Script Files // It will replace the 2 params in huha-test-COM_NAV_SWAP // Export before frequency swap variables from AAO cache into a file with values at C:\Users\your_user_name\Documents\LorbyAxisAndOhs Files\Scripts\myvariables.tsv (EXPORTVARS:myvariables.tsv) (WAIT:300) // now call param script with all different variables to test one by one // swap frequencies and flash encoder LED ring with MIDI command 1 (>K:huha-test-COM_NAV_SWAP;K:COM1_RADIO_SWAP;MIDI:3:CC:1:9) (GOTO:End) 1 (>K:huha-test-COM_NAV_SWAP;K:COM2_RADIO_SWAP;MIDI:3:CC:1:10) (GOTO:End) 1 (>K:huha-test-COM_NAV_SWAP;K:NAV1_RADIO_SWAP;MIDI:3:CC:1:11) (GOTO:End) 1 (>K:huha-test-COM_NAV_SWAP;K:NAV2_RADIO_SWAP;MIDI:3:CC:1:12) (GOTO:End) :End // AAO is starting scripts in as a separate task and is not waiting for its execution, so use WAIT to wait for the script execution (WAIT:300) // Export changes into file C:\Users\your_user_name\Documents\LorbyAxisAndOhs Files\Scripts\changes.tsv (REPLACEVARS:myvariables.tsv, changes.tsv)
  14. Please ignore my comments on the variable debugging. I just realized how the (EXPORTVARS:xxxx) and the (REPLACEVARS:xxxx,yyyy) work in scripts and this is better and was exactly what i was looking for. Sorry for confusing here. I was so far only using the variable window for debugging, but this is much better.
  15. Thanks a lot for your fast response and help. I will send you an email to wildfiretrainingsolutions.ca with proof of purchase. On the debug of variables it may be easier just to read from an ascii file with a special name at a special location if it exists (e.g. variables.txt). The names of the variables could then be just listed line by line e.g: L:COM1_TOGGLE L:COM2_TOGGLE The idea would be that after closing axes and ohs and starting later in another session you do not have to input again all the names. But this is only a minor item for me.
  16. I really like the params in RPN scripts as they make it a lot more efficient. The only thing I am missing here is the automatic checking of the script with the green and red LED in the RPN script window, which does not work if the script contains params. Would it be possible to add a scriptcommand DEBUGPARAMS like DEBUGPARAMS;L:COM1_TOGGLE;K:COM1_RADIO_SWAP which replaces then param1 with L:COM1_TOGGLE and param2 with K:COM1_RADIO_SWAP for internal testing with the green and red LED in the edit RPN script window? Another great efficiency improvement for debugging would be a script command like DEBUGVARIABLE L:COM1_TOGGLE which would automatically add the variable to the "Observe Variables in Simulator" window if it is open and the script is executed. P.S.: A big thanks for all your other recent enhancements to axes & ohs. Those created a lot of value for me and i can use it now on a laptop on the desk while the Fs2020 computer is now running just the simulator. Also the new Web Pages for html instruments are just great.
  17. gundamf91, if Dave could implement a voice input text file (or alternatively a text input box in P2ATC where you can enter the voice text or alternatively an UDP listener for voice input at a specific port) i could think of the following used cases: Case1: Speech recognition with VoiceAttack on a different computer Create a profile with VoiceAttack on a different computer, which just consists of a dummy "Spoken Command" which is used as unrecognized action in the settings of VoiceAttack. The action is just to dump the recognized voice input into a text file on the P2ATC computer which is then automatically recognized as voice input by P2ATC. The text file must have write attributes for every user in the local network. I would volunteer to create a profile for VoiceAttack if Dave would implement a voice input text file or one of the alternative options in P2ATC. This would even work with the demo version of VoiceAttack. Case2: Using VoiceAttack as a grammar translator/adding more phrases to P2ATC and use the grammar of Vatsim or any other European phrases In that case the profile of Case 1 would be extended by "Spoken Commands" in Voice Attack to use your own grammar phrases and the Action in VoiceAttack is to trigger the desired action in P2ATC by outputting the exact P2ATC phrase in the text file. Each spoken command would correspond to a single phrase for which you want to have a specific wording for (special ATC phrases, Vatsim, different language, ...) Case3: Use Cortana for voice recognition I believe it would also be possible with some small scripts to start Cortana in dictation mode and let her do the voice recognition task. The recognized text would then be transferred to the P2ATC computer into a text file. For Case 1,2,3 the PTT sender/receiver app of highflyer525 would be used to bring the PTT joystick command to the client computer, and the command is used to bring VoiceAttack into "listening" mode. It would also allow to use P2ATC together with the great VoiceAttack profiles of VileIntent604 at https://flightsim.to/file/5247/msfs-plug-in-for-voice-attack and jamescl604 at https://github.com/jamescl604/MSFSVoiceAttackPlugin. As I am still having sometimes performance issues on my P2ATC computer this feature would be in my mind a great enhancement for P2ATC.
  18. After another turn of full speech training including some personal grammar phrases, speech recognition improved a lot and is now working as expected. I probably did something wrong here the first time. Thanks a lot for your help. The voice input as a text file is still on my wish list and would enable - using Voiceattack on a different computer for speech recognition - using Voiceattack as a grammar translator/adding more phrases to P2ATC and use the grammar of Vatsim or any other European phrases. You probably could implement a simple filewatcher on a changing datestamp and use the text as voice input. It would be great if that could be considered in one of the next updates.
  19. I did some more testing and saw that in some cases the CPU was at 80% spikes resulting in complete garbage. But in case of the two versus four error the CPU was at 50% and i could not see any spikes. Is there a way in p2atc to receive the voice input from a text file? In that case I could move the voice recognition to my android device and transfer a file.
  20. Dave, gundamf91, thanks a lot for your fast responses. I will check CPU and memory utilization again and try a full speech training. I have done one Ground only.
  21. I just tried P2ATC and I am running into problems with voice recognition. The first couple of phrases work fine and then the number two is recognized repeatedly as four. I tried training with a call sign including a two, but no improvement. And sometimes a completely different sentence is recognized. My system is not the latest one (Intel I5-6600K) , so it may be a performance issue. The GPU is used 100% by FS2020. I played with settings in FS2020 using minimum settings, but no improvement. Any other ideas what to do? A typical example is shown below with the bold fails at the end: Info: Simulator Connected Info: Recognition Engine Installed Info: Grammars Loaded Info: ATIS Freq: 128.65 Info: Clr Del Freq: 126.75 Pilot: PAINE Ground; Cessna Hotel Uniform Hotel; Request Departure Runway One Six Left; ATC: Cessna Hotel Uniform Hotel Departure on runway One Six Left is approved. Contact Ground on One Two One Point Eight for taxi instruction. enjoy Suggested: ~Ground on One Two One Point Eight Cessna Hotel Uniform Hotel Pilot: Ground on One Two One Point Eight; Cessna Hotel Uniform Hotel; Pilot: PAINE Ground; Cessna Hotel Uniform Hotel; Request Taxi Four Runway One Six Left; ATC: Cessna Hotel Uniform Hotel Taxi to Runway One Six Left Via taxiways Golf, Golf One, Hold Short Runway One Six Left Suggested: ~ Taxi to Runway One Six Left Via taxiways Golf, Golf One, Hold Short Runway One Six Left Cessna Hotel Uniform Hotel Pilot: Taxi to Runway One Six Left via Taxiways Golf Golf One Hold Short Runway One Six Left Cessna Hotel Uniform Hotel; Pilot: PAINE Ground; Cessna Hotel Uniform Hotel; ATC: Cessna Hotel Uniform Hotel This is PAINE Ground on One Two One Point Eight Please repeat your request. Suggested: Check your frequency and your request and try again. Cessna Hotel Uniform Hotel Pilot: PAINE Ground; ATC: Aircraft calling Ground say again with your call sign. Suggested: Repeat your request with a proper call sign Cessna Hotel Uniform Hotel Pilot: PAINE Ground Cessna Hotel Uniform Hotel; Say Tower Frequency for Cessna Hotel Uniform Hotel; Pilot: PAINE Ground Cessna Hotel Uniform Hotel Say Altimeter; ATC: Cessna Hotel Uniform Hotel Altimeter is Three Zero Zero One at SNOHOMISH COUNTY Pilot: PAINE Tower Cessna Hotel Uniform Hotel; Request Departure Runway One Six Left; ATC: Cessna Hotel Uniform Hotel Departure on runway One Six Left is approved. Contact Ground on One Two One Point Eight for taxi instruction. enjoy your morning Suggested: ~Ground on One Two One Point Eight Cessna Hotel Uniform Hotel Pilot: Contact Ground on One Two One Point Eight Cessna Hotel Uniform Hotel; Pilot: PAINE Ground Cessna Hotel Uniform Hotel; Request Taxi Four Runway One Six Left for V F R Departure; ATC: Cessna Hotel Uniform Hotel Taxi to Runway One Six Left Via taxiways Golf, Golf One, Hold Short Runway One Six Left Contact Tower on One Two Zero Point Two Suggested: ~Tower on One Two Zero Point Two Cessna Hotel Uniform Hotel Pilot: Cessna Hotel Uniform Hotel; Contact Tower on One Four Zero Point Two Cessna Hotel Uniform Hotel; ATC: Cessna Hotel Uniform HotelTower Frequency is One Two Zero Point Two Suggested: ~Frequency is One Two Zero Point Two Cessna Hotel Uniform Hotel Pilot: Frequency for Slowing to Zero Point Two Seven knots at Uniform Hotel; ATC: Cessna Hotel Uniform Hotel Contact Tower on One Two Zero Point Two Suggested: ~Contact Tower on One Two Zero Point Two Cessna Hotel Uniform Hotel Pilot: Contact Tower on One Four Zero Point Two Cessna Hotel Uniform Hotel; Info: Pilot2ATC Closing
×
×
  • Create New...