Jump to content

ctytler

Members
  • Posts

    67
  • Joined

  • Last visited

Everything posted by ctytler

  1. You'll likely need to add the F-14 module lua script, you can find one if you search back in this thread's history. You can test that it's working by going to the "DCS Comms" page of the StreamDeck plugin and click "Update" while a mission is running in DCS.
  2. Glad the multi action worked out. Another way I had thought of using it is to send a command, then change profile. This could be useful if you have limited space and want to expand out a dial with a lot of values. For example from an FA-18 profile you have an INS button that goes to a FA-18-INS profile that has all the options as multi actions. So you could click “SEA-ALIGN” and it would select that dial value then also go back to FA-18 profile. Saves the user from pressing the back button out of a folder if it’s known they only want to do one button press. Unfortunately with the multi action you are stuck with a static image on that button. Would this be a case where people would want the ability to send multiple commands (to different IDs or sequential values to same ID) from one button press added to the plugin? Also if I could get a multi-state (more than two states) switch working would that be better?
  3. Thanks for making this export and profile! I plan to start using it, and I'm glad the extract was of some help.
  4. I have published a new release of the plugin which fixes the issue with the ID Lookup window not populating the table for the A-10C II or the Mi-24P Hind. Available here: https://github.com/charlestytler/streamdeck-dcs-interface/releases/tag/v1.0.4 Note: to update you will need to uninstall the plugin first by right-clicking one the switch/button options in the Streamdeck GUI and selecting Uninstall, then reinstall by double-clicking the downloaded com.ctytler.dcs.streamDeckPlugin file. @Bailey for viz.
  5. Yes, the plugin only uses the DCS install location for the ID Lookup table. So feel free to move it, then just update the install location in the ID Lookup window.
  6. For the radio knobs, these for some reason work best with a momentary button input instead of increment for some reason. Try that with a positive input value to increase and negative value to decrease. For the RWR if the off/on states for the buttons are 0/1, when you use the momentary button it will command 1 then 0 on release. There’s a checkbox in the button Command settings that should allow you to disable the release, or you may want to use a switch instead. I’m unsure what the issue with reset is, generally all the buttons on the stream deck should reset their state at the start of a new mission.
  7. Hi I'd like to contribute with a pull request to add some additional lamp indicators to the module-ajs37 plugin. I can see that adding the following to AJS37.lua: defineIndicatorLight("MASTER_CAUTN_LH_LAMP", 444, "Front Panel Lights", "Master Caution (HUVUDVARNING) Left Lamp") defineIndicatorLight("MASTER_CAUTN_RH_LAMP", 445, "Front Panel Lights", "Master Caution (HUVUDVARNING) Right Lamp") defineIndicatorLight("ALT_WARNING_LAMP", 450, "Front Panel Lights", "Altitude Warning Lamp") defineIndicatorLight("FALLD_LAST_LAMP", 461, "Front Panel Lights", "Falld Last (Stores Released) Lamp") defineIndicatorLight("REV_TRANSONIC_LAMP", 462, "Front Panel Lights", "Revadvr Transonic Lamp") will call the BIOS.Util.defineIndicatorLight() function which adds documentation info to the moduleBeingDefined.documentation, but I'm unsure how to inspect this information (particularly the assigned memory address) to populate the corresponding AJS37.json file in the plugin folder. Any advice on what's the process one would take to properly add fields? I found an older DCS-BIOS Developer Guide doc, but it's not clear to me if the json's were just autogenerated in the dcs-bios version that doc describes, and it doesn't account for the plugin method of modules. Thanks.
  8. Hi @bones1014 and @Weegie, sorry for the slow response. The Viggen mode buttons don't show up in the ID Lookup because they aren't detailed in the "clickable_data" lua files I query from to populate the tables (basically anything with a hover text in the cockpit is pulled in from this). However they are assignable in Control options so are possible to bind to. Looking in the Viggen's Mods\aircraft\AJS37\Input\joystick\default.lua file, it lists: {combos = {{key = "Q", reformers = {"LCtrl"}}}, down = 3100, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - FK", category = "Mode selector"}, {combos = {{key = "Q", reformers = {"LAlt"}}}, down = 3101, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - BER", category = "Mode selector"}, {combos = {{key = "Q", reformers = {"RAlt"}}}, down = 3102, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - NAV", category = "Mode selector"}, {combos = {{key = "Q", reformers = {"RCtrl"}}}, down = 3103, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - ANF", category = "Mode selector"}, {combos = {{key = "Q", reformers = {"RShift"}}}, down = 3104, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - SPA", category = "Mode selector"}, {combos = {{key = "W", reformers = {"RCtrl"}}}, down = 3105, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - LANDNAV", category = "Mode selector"}, {combos = {{key = "W", reformers = {"RShift"}}}, down = 3106, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Mode select - LANDPO", category = "Mode selector"}, {combos = {{key = "X", reformers = {"RShift","RCtrl"}}}, down = 3200, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "HÖJD CISI", category = "Navigation"}, {combos = {{key = "Z", reformers = {"RShift","RCtrl"}}}, down = 3201, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "SLAV SI", category = "Navigation"}, {combos = {{key = "T", reformers = {"RShift","RCtrl"}}}, down = 3210, cockpit_device_id = devices.FLIGHTDATAUNIT, value_down = 1.0, name = "Pitch gearing Automatic/Landing", category = "Flight Control"}, And within the Streamdeck plugin ID Lookup table if you search "FLIGHTDATAUNIT" you can see it is Device ID = 22. So you can manually populate the fields in the plugin button for DCS Command Settings: Mode Select - ANF Button ID: 3009 Device ID: 22 Send Value while Pressed: 1 I've attached a Viggen profile I use where I added a "Master Mode" folder that has the working selections. Viggen.streamDeckProfile
  9. Hi @Olddog, thanks for reporting, I've created an Issue ticket on Github with your description: https://github.com/charlestytler/streamdeck-dcs-interface/issues/31 I updated my Streamdeck Software and Firmware versions to match yours but was unable to reproduce the issue, so it doesn't look like a version change alone caused it. If you have a github account, could you upload the full error log to that issue ticket to see if it contains any other clues on what happened? If you don't want to set up an account, you can just DM me further details here in the forums. If anyone else sees this issue please comment on that github issue and/or check status there.
  10. I got some time to look at this. This seems to be an idiosyncrasy in how DCS handles radio knobs that shows up in all modules it seems, see my video for a similar problem here. Try to use Momentary Buttons with Send commands "0.1" for increase and "-0.1" for decrease instead of rotary commands. That worked for me for the R-863. Also, while I was looking at the Mi-8 script I saw it's not publishing relevant radio frequencies. To get these make the following changes: -- Change the below from %1d to %.2f within the Mi-8MT.lua file: [370] = "%.2f", --PTR-LPE-LVR-CHANNEL (R-863, Radio channel selector) Then you can see the current Preset channel selected (with the Red Valve knob) by a "Momentary Button/Display (Text)" button with the following settings: - Title Text Change on DCS ID: 370 - Uncheck "Display string unaltered" - Map Value to Display Text: 0.00=1,0.05=2,0.10=3,0.15=4,0.20=5,0.25=6,0.30=7,0.35=8,0.40=9,0.45=10,0.50=11,0.55=12,0.60=13,0.65=14,0.70=15,0.75=16,0.80=17,0.85=18,0.90=19,0.95=20 -- Add the below to the Mi-8MT.lua file (around line 1060): --Within the function: function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice) -- JADRO 1A local lJADRO_1A = GetDevice(37) if lJADRO_1A:is_on() then ExportScript.Tools.SendData("2000", ExportScript.Tools.RoundFreqeuncy(lJADRO_1A:get_frequency()/1000, "7.1")) else ExportScript.Tools.SendData("2000", "-") end -- R-863 local lR_863 = GetDevice(38) ExportScript.Tools.SendData("2010", ExportScript.Tools.RoundFreqeuncy(lR_863:get_frequency()/1000000)) To get those frequencies on DCS ID's 2000 and 2010
  11. I was searching the forums and couldn't find any discussion on how to set up an Arduino board to enable/disable functionality based on Module. So I came up with a method to do so for LEDs and thought I'd share if it's useful to anyone else. Here is an example sketch to set up a Master Caution indicator light for multiple modules for a single LED. It's done with a wrapper around the DcsBios::LED class that can set it active or deactive. Note the code copy/pasted from the Control Reference is modified to be a ModuleLED instead of DcsBios::LED and includes the aircraft module name as the first argument -- this name must match the names used for the modules by the game. You'll also see that "A-10C" and "A-10C_2" are considered different modules so each are there with the same values. #define DCSBIOS_DEFAULT_SERIAL #include <DcsBios.h> constexpr int kPinMasterCautionLed = 15; /// Pin number LED is connected to. // ModuleLED: This is a wrapper around the standard DcsBios::LED that allows // the functionality to only be enabled when the specified module is in use. class ModuleLED : public DcsBios::LED { private: char *moduleName; bool is_active = false; unsigned char pin; public: ModuleLED(char *moduleName, unsigned int address, unsigned int mask, char pin) : moduleName(moduleName), pin(pin), DcsBios::LED(address, mask, pin) {} virtual void loop() { if (is_active) { DcsBios::LED::loop(); } } void set_active_according_to_module(char *newValue) { digitalWrite(pin, LOW); // Turn off by default until turned on again by module. is_active = !strcmp(moduleName, newValue); } }; // Define all LEDs in an array to easily loop through them later. ModuleLED leds[] = { ModuleLED("A-10C", 0x1012, 0x0800, kPinMasterCautionLed), ModuleLED("A-10C_2", 0x1012, 0x0800, kPinMasterCautionLed), ModuleLED("AV8BNA", 0x7860, 0x1000, kPinMasterCautionLed), ModuleLED("FA-18C_hornet", 0x7408, 0x0200, kPinMasterCautionLed), ModuleLED("F-16C_50", 0x4472, 0x0800, kPinMasterCautionLed), ModuleLED("UH-1H", 0x1416, 0x0100, kPinMasterCautionLed), }; // This callback function is called every aircraft change with the module name as newValue. void onAcftNameChange(char *newValue) { const size_t number_of_leds = sizeof(leds) / sizeof((leds)[0]); for (size_t i = 0; i < number_of_leds; i++) { leds[i].set_active_according_to_module(newValue); } } DcsBios::StringBuffer<24> AcftNameBuffer(0x0000, onAcftNameChange); // For reference, these are the copy/paste code snippets as found in // the DCS-BIOS Control Reference that were modified. // DcsBios::LED masterCaution(0x1012, 0x0800, PIN); // From A-10C // DcsBios::LED mcLight(0x7860, 0x1000, PIN); // From AV8BNA // DcsBios::LED masterCautionLt(0x7408, 0x0200, PIN); // From FA-18C // DcsBios::LED lightMasterCaution(0x4472, 0x0800, PIN); // From F-16C // DcsBios::LED masterCautionInd(0x1416, 0x0100, PIN); // From UH-1H void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
  12. Hi, thanks Scooter, to first address your suggestions: 1. This isn't possible because of the way the StreamDeck GUI works: its built around lots of individual buttons doing different functions. So each time you click on a different button it closes any open context from the previous one. I'm able to save some global settings which is how it maintains some information from button to button (like I got it to remember which aircraft module was last used for ID Lookups). But as a plugin that's the only interface I can provide (I don't think Elgato thought people would be making full 32 page layouts of all one plugin either). 2. It's true that Elgato only has two images max it shows in the button settings. I haven't investigated fully but I believe it's possible to maintain more states with additional images, but it would take some creative way to make it customizable by the user in a straightforward way. (Maybe have to create an additional web page popout similar to the ID Lookup Table). 3. Ha, yeah sorry no tips there. Current Status: Refactoring/Clean Up In terms of updates to the plugin, I've been doing some refactoring of the code lately to make it more modular in creating new button types and also adding more unit tests to make sure all functionality is maintained when new features will be added. This has been small improvements over time alongside my actual work and other side projects, so I don't really have a prediction of how long this will go on. Features/Fixes Once that's done there's some features I'd like to add, such as 3-positions switches and having separate commands for Short/Long press I think would be doable. New features as well as any Bugs found with the Streamdeck should be reported as an Issue in the Github repo here: https://github.com/charlestytler/streamdeck-dcs-interface/issues So far there haven't been any major bugs found in the plugin itself since its first month, but I will fix any if they do appear. Most problems/questions stem from the DCS-ExportScripts, which is more prone to getting outdated anyways... which leads me to the next topic. Reliance on DCS-ExportScripts This was a nice project with a simple interface to use for the Streamdeck plugin, however it is no longer being maintained unfortunately. This has led to other users having to generate their own .lua scripts, but these are also prone to getting outdated (as recently seen with a F-16 crash bug when the module changed). So I've been considering two options for the future of the plugin (one or both could be done): Set up a new online repository of Module export .lua scripts in a way the community can easily modify on their own with minimal moderation. This would allow continued use of the DCS-ExportScript and more easily incorporate fixes in the individual module files as the modules change over time. This could also house user profiles potentially for the Streamdeck. I've been hesitant to take this on as it wasn't my intention to deal with the module export details (unfortunately DCS-ExportScripts went silent shortly after the Streamdeck plugin was released). Update the Streamdeck plugin to communicate to Helios and/or DCS-BIOS. These are more actively maintained, and the Helios developer has been friendly to offer support, but will just take some more investigation on my end. Although one of the goals of the above mentioned refactoring would also be to support this.
  13. It should still work fine with DCS 2.7, the DCS-ExportScripts are at risk of getting out of date if modules change ID numbers of items (the AV8B has lots of things changing I believe). Unfortunately that project seems to have stopped maintaining its scripts. You'll likely need to copy your P-47 module export .lua file to have the following names for each aircraft: P-47D-40 P-47D-30 P-47D-30bl1
  14. Thanks for creating this post. I have an alternate way I ended up going for engraving on CNC, that may be especially helpful for anyone looking to engrave very small text (but it works for large too). I used a spring-loaded Diamond Drag bit, I got one off eBay that's still pretty pricey - but cheaper than a laser at least. I used Fusion 360 for the CAM profile and to represent the Tool I just said it was a flat endmill with 1 thou diameter, the rest of the settings don't really matter that much. Since it's a drag bit, I run the gcode without turning on the router, so the spindle speed doesn't matter. Also since it's just dragging the tip across the surface the cutting rate doesn't matter much for the material. You should be able to set it as high as your machine can accurately move. I designed using the "Text" tool directly in Fusion 360 sketch, and extrude (cut) them -1mm into the material. The depth doesn't really matter since the bit is spring loaded, but providing a significant depth makes sure there's always solid contact with the surface. I engrave the text using two operations, first a 2D Face operation: Followed by a 2D Contour operation to clean up the outlines: This obviously takes a long time to run (about an hour for this full panel), but comes out with good results. Posted a clip of the engraving here: https://imgur.com/gallery/sgssKEy Final results (majority of text is 3mm height, some set to 2.5mm):
  15. Unfortunately it seems as if it is no longer being maintained. See comments in this Github issue for the DCS ExportScript repo.
  16. For the game path, you can click on the "ID Lookup" button in the Streamdeck GUI for one of the buttons and at the top of the window is a place you can enter the G drive location and click Update. However, this only really affects the table shown in this ID Lookup window -- if it finds your install you should see your list of modules appear. As for the other log, it sounds like you found that string in the file "Saved Games\DCS\Logs\dcs.log", correct? If that is showing up and there is no file there named "Saved Games\DCS\Logs\Export.log", then it sounds like something is not working with the ExportScript. When I run a mission then open "Saved Games\DCS\Logs\Export.log" it shows: ExportScript Version: 1.2.1 21:56:27:666 : Create UDPSender 21:56:27:668 : Create UDPListner 21:56:27:673 : File Path: C:\Users\cjtyt\Saved Games\DCS\Scripts\DCS-ExportScript\ExportsModules\FA-18C_hornet.lua 21:56:27:675 : File 'C:\Users\cjtyt\Saved Games\DCS\Scripts\DCS-ExportScript\ExportsModules\FA-18C_hornet.lua' loaded 21:56:27:675 : Version: 21:56:27:675 : Config: 1.2.1 21:56:27:675 : Maps: 1.2.1 21:56:27:675 : Tools: 1.2.1 21:56:27:675 : FA18C_hornet: 1.2.1 21:56:27:675 : genericRadio: 1.2.1 21:56:27:675 : ExportScript: 1.2.1 21:56:27:675 : Detected Map: PersianGulf 21:56:42:012 : reset dcs ikarus 22:00:58:302 : ====== Logfile close ====== I'd suggest checking the install of the ExportScript or try reinstalling it. Sometimes there can be conflicts with other scripts included in the Export.lua. Do you have anything else such as Tacview, Helios, Vaicom, BIOS installed there? If so, perhaps try commenting all of the others out to see if ExportScript can run by itself.
  17. Thanks for pointing that out, I also have this at a higher setting, and without it the flickering is much more noticeable. I would look at the examples in the A-10C.lua file, it combines pressure values into a new value how you would like to: [59] = "%.4f", -- pressure_setting_0 [58] = "%.4f", -- pressure_setting_1 [57] = "%.4f", -- pressure_setting_2 [56] = "%.4f", -- pressure_setting_3 [61] = "%.1f", -- AAU34_PNEU_flag -- Pressure setting -------------------------------------------------------- local pressure_setting_3 = mainPanelDevice:get_argument_value(56) * 10000 -- {0.0, 10.0} {0.0, 1.0} local pressure_setting_2 = mainPanelDevice:get_argument_value(57) * 1000 -- {0.0, 10.0} {0.0, 1.0} local pressure_setting_1 = mainPanelDevice:get_argument_value(58) * 100 -- {0.0, 10.0} {0.0, 1.0} local pressure_setting_0 = mainPanelDevice:get_argument_value(59) * 10 -- {0.0, 10.0} {0.0, 1.0} local pressure_setting = ((pressure_setting_3 + pressure_setting_2 + pressure_setting_1 + pressure_setting_0) / 100) ExportScript.Tools.SendDataDAC("2006", string.format("%5.2f", pressure_setting)) For the landing gear light, finding this value may be a bit more involved, instructions for how DCS ExportScript gets their IDs are found here: https://github.com/s-d-a/DCS-ExportScripts/wiki/Documentation-in-English#Create The DCS Bios folks deal with a lot of this stuff as well, and there may be some threads that have knowledge of that export value or how to find it. I haven't explored too much in extracting lamp export IDs from modules other than what has already been done by ExportScript/Helios/DCS-Bios people.
  18. Can you tell if DCS Export script is working? They have a log file in "Saved Games\DCS\Logs\Export.lua" that should write out some data each time a Mission is started. If that is working, then you can next test from the StreamDeck side. There is the DCS comms button which opens a window from the plugin, and you can click Refresh to see if it is reading any data from the specified IP address and port. If the Export Script is working, but Streamdeck isn't and the ports are configured the same in both, you can also look at a log file generated by the Streamdeck. In Windows Explorer paste the following location in the address bar: "%appdata%\Elgato\StreamDeck\logs". There should be log files there for "com.ctytler.dcs#.log
  19. The A-10C.lua file is located within "Saved Games\DCS\Scripts\DCS-ExportScript\ExportsModules", and the A-10C_2.lua does not exist yet, so you have to copy paste the original A-10C.lua file and rename the copy to A-10C_2.lua Yes, there essentially are two image update commands in conflict. The switch button for the native Streamdeck assets always switches to the next image after a button press. However for the DCS plugin I really only want it to change when I've received confirmation that the switch has changed in the game - particularly for switches like Autopilot ones that may not stay up if trim conditions aren't met. So these two mechanisms essentially fight against each other. I tried a couple different methods of handling this, because its made more difficult from the fact that the game only reports the in-game switch state on a change and not again, but there's some delay in reporting back. So one way looked smoother, but would occasionally get stuck in the up position, when the game had returned to down position. I settled on the current implementation which has some graphical flickering, but at least reliably represents the game state. I plan to revisit this and can likely improve it by adding some debouncing/timeout logic to the switches, but this will require likely incorporating timestamping and additional internal state to keep track of for elements which I currently am able to avoid. There's also a method to request a reset and resend of all data from the export script I think, but I was concerned about doing this for every switch press. I'll share when I have an update, but lately have been working on other side projects.
  20. Follow up from my previous post, there are a few situations I saw where there were rounding issues in the lua in the kHz range, i.e. value shows up as 124.099 instead of 124.100, while splitting up the digits. It may need some tweaking, but I think it’s quite useable for now. I’d also like to incorporate string manipulation on the Streamdeck UI side, but it will go on my backlog of tasks.
  21. Hi all, sorry for lack of timely responses lately. Let me try to catch up... A-10C II Tank Killer @SmilingBandit - Thanks for posting how to update for the A-10C II, I've been able to send multiple people to your comment. The "ID Lookup" currently works for A-10C but not for A-10C_2, I'll look into fixing this, however at first glance it looks like most IDs have remained the same and you can use the standard A-10C table for now. A-10C Radios @SmilingBandit I made an edit to the A-10C export lua file to add new uplink messages for each digit of the radio display. If you modify the Radio "SendData" sections (around line 805 for me) to look like the following you will have a 2500-numbered set of values to use for each digit of the radio. Note that this doesn't handle the "A" digit for UHF, and it gets some odd rounding of 24 or 74 instead of 25,75 sometimes, but you could handle these with mapping in the streamdeck (24=25,25=25,etc.). -- AN/ARC-164 UHF and UHF Preset Channel --------------------------------------------------- local lUHF_RADIO = GetDevice(54) if lUHF_RADIO:is_on() then ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((lUHF_RADIO:get_frequency()/1000000))) local uhf_freq_MHz_all = ExportScript.Tools.RoundFreqeuncy((lUHF_RADIO:get_frequency()/1000000)) local uhf_freq_100MHz = math.floor(uhf_freq_MHz_all/100) local uhf_freq_10MHz = math.floor((uhf_freq_MHz_all - uhf_freq_100MHz*100)/10) local uhf_freq_1MHz = math.floor(uhf_freq_MHz_all - uhf_freq_100MHz*100 - uhf_freq_10MHz*10) local uhf_freq_100kHz = math.floor((uhf_freq_MHz_all - uhf_freq_100MHz*100 - uhf_freq_10MHz*10 - uhf_freq_1MHz)*10) local uhf_freq_1kHz = math.floor((uhf_freq_MHz_all - uhf_freq_100MHz*100 - uhf_freq_10MHz*10 - uhf_freq_1MHz - 0.1*uhf_freq_100kHz)*1000) ExportScript.Tools.SendData(2501, uhf_freq_100MHz) ExportScript.Tools.SendData(2502, uhf_freq_10MHz) ExportScript.Tools.SendData(2503, uhf_freq_1MHz) ExportScript.Tools.SendData(2504, uhf_freq_100kHz) ExportScript.Tools.SendData(2505, uhf_freq_1kHz) -- Note for the 100MHz this will show values 2,3,4 instead of 2,3,A -- this can be fixed with the text mapping in the Streamdeck plugin local lPresetChannel = ExportScript.Tools.getListIndicatorValue(10) ExportScript.Tools.SendData(2001, string.format("%s", lPresetChannel.txtPresetChannel)) else ExportScript.Tools.SendData(2000, " ") ExportScript.Tools.SendData(2001, " ") end -- AN/ARC-186(V) VHF AM and Preset Channel --------------------------------------------------- local lVHF_AM_RADIO = GetDevice(55) ExportScript.Tools.SendData(2002, ExportScript.Tools.RoundFreqeuncy((lVHF_AM_RADIO:get_frequency()/1000000))) local vhfAM_freq_MHz_all = ExportScript.Tools.RoundFreqeuncy((lVHF_AM_RADIO:get_frequency()/1000000)) local vhfAM_freq_10MHz = math.floor((vhfAM_freq_MHz_all)/10) local vhfAM_freq_1MHz = math.floor(vhfAM_freq_MHz_all - vhfAM_freq_10MHz*10) local vhfAM_freq_100kHz = math.floor((vhfAM_freq_MHz_all - vhfAM_freq_10MHz*10 - vhfAM_freq_1MHz)*10) local vhfAM_freq_1kHz = math.floor((vhfAM_freq_MHz_all - vhfAM_freq_10MHz*10 - vhfAM_freq_1MHz - 0.1*vhfAM_freq_100kHz)*1000) ExportScript.Tools.SendData(2511, vhfAM_freq_10MHz) ExportScript.Tools.SendData(2512, vhfAM_freq_1MHz) ExportScript.Tools.SendData(2513, vhfAM_freq_100kHz) ExportScript.Tools.SendData(2514, vhfAM_freq_1kHz) local lVHF_AM_RADIO_PRESET = {[0.0]="1",[0.01]="2",[0.02]="3",[0.03]="4",[0.04]="5",[0.05]="6",[0.06]="7",[0.07]="8",[0.08]="9",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="1"} ExportScript.Tools.SendData(2003, lVHF_AM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(137), 2)]) -- AN/ARC-186(V) VHF FM and Preset Channel ------------------------------------------------- local lVHF_FM_RADIO = GetDevice(56) ExportScript.Tools.SendData(2004, ExportScript.Tools.RoundFreqeuncy((lVHF_FM_RADIO:get_frequency()/1000000))) local vhfFM_freq_MHz_all = ExportScript.Tools.RoundFreqeuncy((lVHF_FM_RADIO:get_frequency()/1000000)) local vhfFM_freq_10MHz = math.floor((vhfFM_freq_MHz_all)/10) local vhfFM_freq_1MHz = math.floor(vhfFM_freq_MHz_all - vhfFM_freq_10MHz*10) local vhfFM_freq_100kHz = math.floor((vhfFM_freq_MHz_all - vhfFM_freq_10MHz*10 - vhfFM_freq_1MHz)*10) local vhfFM_freq_1kHz = math.floor((vhfFM_freq_MHz_all - vhfFM_freq_10MHz*10 - vhfFM_freq_1MHz - 0.1*vhfFM_freq_100kHz)*1000) ExportScript.Tools.SendData(2521, vhfFM_freq_10MHz) ExportScript.Tools.SendData(2522, vhfFM_freq_1MHz) ExportScript.Tools.SendData(2523, vhfFM_freq_100kHz) ExportScript.Tools.SendData(2524, vhfFM_freq_1kHz) I've also included an image of the Display icon with a decimal point I used as the icon image for the third decimal place in the attached example. In case you want to use that, it fits with Tahoma size 18 text. Example Profiles - A-10C, AV8B, F/A-18, JF-17 In case you want to see how I implemented it in the Streamdeck I've uploaded my profiles to an example folder on the github page (Note sized for Streamdeck XL): https://github.com/charlestytler/streamdeck-dcs-interface/tree/master/Release/Examples
  22. Yes I do, you can create an issue ticket in the GitHub repo and add a label of feature request. You may also want to try doing that modification in the module export script itself. There should be other examples where values are manipulated for example to combine individual digits into a single number, you could do the same thing and add a new ID with converted values. Take a look at the AV8BNA.lua file and one example is combining 4 digits sent as different IDs for the fuel gauge into one string sent as ID 2011 on line 656.
  23. The final output to the game is the same for a switch or rotary the only difference is the sequence of commands and resulting state of the stream deck button. With a switch you’ll want to make sure that the Send 1st->2nd state = 1, and Send 2nd->1st state = 0 (I believe it defaults to -1). Another point about switches is they don’t switch button state (determining what they’ll send on next press) based on user-presses, but according to the sim state configured in the image change settings. So if the command settings are correct but it’s not getting feedback from the game that the cockpit switch has changed, then the stream deck button will stay in the off state and keep sending (1) on each press. You can use the DCS Comms window in the plugin to help debug an issue like this. Identify the ID number of the switch status being monitored and try switching it on and off in game and refreshing to see if the value is changing in the uplink.
  24. I recently created a JF-17 UFCP profile for the Streamdeck XL, and put up a video on how to build up more export info than just the clickabledata in one of the modules that doesn't have an official plugin yet. The first video is on exploring what data is possbile to be extracted: And the second video is adding the display text of interest (from the UFCP) to the JF-17 module export script: Attached is the profile with an updated .lua script and icon images. JF-17_UFCP.zip
  25. speed-of-heat, if you only want to use the send commands without the game feedback you could try setting "ExportScript.Config.IkarusExport" to false within the export script config. I believe it will still listen for input commands.
×
×
  • Create New...