Jump to content

Custom radio setup is a nightmare


Recommended Posts

I'm trying to set up a custom radio and I've run into a problem.

First, declaring the radio/intercom devices in lua alone doesn't work. Using avSimplestRadio is how to make it work, but honestly I think this could be streamlined.
Anyway, now I get subtitles but not the audio. Is there something I'm missing?


Edited by Sérvalpilot
Title changed to more accurately convey the situation.
Link to comment
Share on other sites

On 1/24/2024 at 7:45 PM, Sérvalpilot said:

I'm trying to set up a custom radio and I've run into a problem.

First, declaring the radio/intercom devices in lua alone doesn't work. Using avSimplestRadio is how to make it work, but honestly I think this could be streamlined.
Anyway, now I get subtitles but not the audio. Is there something I'm missing?

Custom Radio is, CPP/LUA combination, you can check A4 code for the whole self implementation.

avSimplestRadio is A-29B, to use from LUA only also need to and DLL load in Entry.lua since he don't implement EFM right now.

MOD Logo - 100.png

Link to comment
Share on other sites

9 hours ago, freebirddz said:

Custom Radio is, CPP/LUA combination, you can check A4 code for the whole self implementation.

Thanks.

I took a peek at the radio section of the A-4 source code before and I got scared by the assembly and dll linking stuff. It's a shame it has to be so tricky.

Link to comment
Share on other sites

12 hours ago, Sérvalpilot said:

Thanks.

I took a peek at the radio section of the A-4 source code before and I got scared by the assembly and dll linking stuff. It's a shame it has to be so tricky.

don't look at ASM, just keep eyes on CPP

MOD Logo - 100.png

Link to comment
Share on other sites

  • 3 weeks later...

I put my flyable aircraft mod (EFM) on hold for almost a year now because I can't make the radio work. I think the only missing step is to turn the radio ON which apparently is not exposed to lua scripts. I want to scream!

i7-7700K@4.8GHz, 16Gb-3200, GTX-1080Ti-Strix-11Gb, Maximus IX Hero, Oculus Rift, Thrustmaster Warthog+F/A-18C, Logitech G940 Pedals.

Link to comment
Share on other sites

  • 1 month later...
On 2/18/2024 at 11:48 PM, Jack McCoy said:

I put my flyable aircraft mod (EFM) on hold for almost a year now because I can't make the radio work. I think the only missing step is to turn the radio ON which apparently is not exposed to lua scripts. I want to scream!

you right, there is 2 part to make it work, C++ and LUA, the better example is A4E community MOD, you have both opensource, still simple implementation and do have some problem with IA communications, but at lease you can call ATC or Tanker

MOD Logo - 100.png

Link to comment
Share on other sites

I made a bit more progress on the code front, I managed to get to a point where DCS crashes consistently with the same error code.

For the record, according to the A-4 source code, the steps to setting it up are:

 

  1.  Get wire from Electrical System
  2.  Connect wire to radio
  3.  Get communicator and then set it as current.
  4.  Get a pointer to the virtual function pointer table for the inherited radio.
  5.  Use this pointer to find the setElecPower function.

I managed to pinpoint where it crashes. The problem is connecting the wire.

Here are a  couple lines from the crash log:

EDCORE (Main): # C0000005 ACCESS_VIOLATION at 00007ffa9fa81ce0 00:00000000
EDCORE (Main): 0x00000000002c1ce0 (CockpitBase): cockpit::avVHF_SCR_522A::connect_electric + 0x0

I know this might be like sending a message in a bottle, but does anyone have any ideas on getting this to work?

Link to comment
Share on other sites

  • Sérvalpilot changed the title to Custom radio setup is a nightmare

I finally got it working!

The last post error was me messing up things on the Lua side.

I can't communicate with ground crew, however.

Now I'm just cleaning things up and documenting, I might make a guide or implement it in my Basic FM project.

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...
On 3/31/2024 at 11:11 AM, Sérvalpilot said:

I finally got it working!

The last post error was me messing up things on the Lua side.

I can't communicate with ground crew, however.

Now I'm just cleaning things up and documenting, I might make a guide or implement it in my Basic FM project.

Congrats! To communicate with the ground crew, I think the canopy needs to be open (and recognized as such by DCS) OR you need to set up an intercom device. From what I've seen, radios and intercom are related as "linked devices" which, to me, is yet another layer deeper in the black box... Bonne chance!

i7-7700K@4.8GHz, 16Gb-3200, GTX-1080Ti-Strix-11Gb, Maximus IX Hero, Oculus Rift, Thrustmaster Warthog+F/A-18C, Logitech G940 Pedals.

Link to comment
Share on other sites

On 4/19/2024 at 5:13 AM, Jack McCoy said:

To communicate with the ground crew, I think the canopy needs to be open (and recognized as such by DCS) OR you need to set up an intercom device.

You're right. The canopy needs to be open to communicate with the ground crew. I like to imagine you literally shout at the ground crew if the engines are on!

I'll try to figure out the intercom stuff.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...