Open hurricanenz opened 7 months ago
Not sure what happened someone asked how to get radar to work on ground, and my comment and theirs disappeared. While on the ground get ground power connected, set radar to A/G and a green bar should continuously run from top of radar screen to bottom. To test the radar angle you will be best to be in the air and in search mode.
Testing object avoidance volume set mode to search I believe, and set to profile, should get a side profile and when objects get into your predicted path you should hear a warning tone. This should be controlled by the volume knob on radar panel.
The angle of attack computer switch is a bit harder as there is no real way of knowing this is active beside the switch position.
It was me, I had to apply full brightness on the radar to see that it was actually working.
So I can confirm that something is broken.
RADAR_MODE
:
With dcs-insight
I can change the argument which is 120
and that shows changes in the cockpit. Values are 0, 0.1, 0.2, 0.3, 0.4. This doesn't make the switch perform the commands which is as it should be. This is expected but confirms 120 is the right argument.
But using command 3063 which should work does not (although the dial moves). That should trigger what ever thing the dial is supposed to do.
At the moment I have no idea on how to proceed.
DCS-BIOS
:
A_4E_C:defineMultipositionSwitch("RADAR_MODE", 10, 3063, 120, 5, 0.10, "Radar Control Panel", "Radar Mode")
A-4E
:
elements["PNT_120"] = multiposition_switch_limited( "AN/APG-53A Radar Mode Switch", devices.RADAR, device_commands.radar_mode, 120, 5, 0.10, nil, nil, KNOBCLICK_LEFT_MID )
I'll just mention that there are some animations attached to that control. Not saying that those are causing this but no other controls mentioned here have these.
elements["PNT_120"] = multiposition_switch_limited( "AN/APG-53A Radar Mode Switch", devices.RADAR, device_commands.radar_mode, 120, 5, 0.10, nil, nil, KNOBCLICK_LEFT_MID )
elements["PNT_120"].animated = {true, true}
elements["PNT_120"].animation_speed = {4, 4} -- multiply these numbers by the base 1.0 second animation speed to get final speed. 4 means animates in 0.25 seconds.
Tried with having the animations commented out but the problem persists.
@hurricanenz, I would ask the makers of the A-4 if they have any idea what is going on here.
Via dcs-insight
I called the DCS API GetDevice(device_id):performClickableAction(command_id, new_value)
directly, not using DCS-BIOS
and still it doesn't work. So I am at a loss here on what to do.
Thanks, I will divert them to look at this post as most I don't fully understand what you have said due to my lack of knowledge.
For now I am able to assign these to a joystick function and these functions all work. I was just trying to make use of spare I/O I had in the existing panel.
Yeah, I am by all means no expert in all this. I would just have expected that calling the DCS API directly would work. That is one of the first steps I do when investigating a troublesome control. Let's hope they can share some information on what it could be.
DCS-BIOS version 0.8.0 [2.9.3]
DCS-BIOS Control DcsBios::PotentiometerEWMA<5, 256, 5> radarAngle("RADAR_ANGLE", A3);
DcsBios::Switch2Pos radarAoacomp("RADAR_AOACOMP", 10);
DcsBios::AnalogMultiPos radarMode("RADAR_MODE", A2, 5);
DcsBios::PotentiometerEWMA<5, 256, 5> radarVol("RADAR_VOL", A1);
Describe the bug When changing an input for the Radar panel to all of the above control references, the game will change visually, dial will rotate and switch will change position, in-game sound of change will happen but will not actually change input state.
To Reproduce set position of mode switch to A/G{last position) while on ground power on. Dial will move to A/G but radar display will not change. I then can click once right mouse button and the radar will start.
This is true for the radar angle , radar AOAcomp, radar mode and radar volume.
I can set the values through BORT by increasing Radar Mode/input/fixed_step/ INC. I change from off position use the INC button and the Output value will change to 4 and 100%, in cockpit it will show the position of the dial at A/G but the radar screen will be in a off state.
Expected behavior The input change to match in cockpit operations
Additional context I am using Arduino Nano with other outputs configured and functional. I have tested on a new Nano using only the code relevant to the radar. I have a Armament panel that works purely off DCS bios and have no issues with similar code.