Jump to content

Recommended Posts

Posted

I managed to get the Dynamic sketch to work, for the moment, just using the switch. That's a great improvement though, I could just leave it here, but it'd be great if I could handle it with the seat variable. Attaching the current working sketch, in case you want to have a look at it.

KU-DCS_BIOS_dynamic.ino

Posted (edited)

The seat function expects an integer but your status variable may still be declared as bool.

I'll later have a look into the new sketch.

Regards, Vinc

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted (edited)

@SrSosio

As expected, you may have to change the declaration of bool status into int status to use the onSeatPositionChange function, even if the output would be either 0 or 1.

 

Regards, Vinc

 

Edit: it's a really great hack to use the dynamic sketch to even swith the function of a whole panel. Respect! 👍

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted
9 hours ago, No1sonuk said:

From the addresses.h file:

#define AH_64D_SEAT_POSITION 0x8750, 0x0100, 8

So if you weren't giving it all 3 of those numbers, it won't work.

 

I've now checked, and I do have that file, however, there are some things that make me think it's not the right one (even though I downloaded dcs-bios from the github just a few days ago for the first time, so I should have the latest version):

  • #define AH_64D_SEAT_POSITION 0x8750, 0x0100, 8  I don't have that line in my file
  • For the display (CPG, for example) bort says this:

image.png

but my addresses.h file says: #define AH_64D_CPG_KU_DISPLAY_ADDR 0x80AC, that's why I had to use the value instead of the variant.

I'll check out the github, see if I can find the file updated.

Edit: found it! but probably the one in the zip folder in the release file should be replaced, unless you are expected to replace it afterwards as I had to do now.

Posted

So the final code is finished and working (attached). The only thing not working is the APU led, which is a korry with 2 leds, hence why I duplicated the line. It may be because it's in a different device (the throttle quadrant) and the ground is not common to the Mega, only the two output lines are coming out of it. So those LEDs have the ground connected to the throttle quadrant USB, but the anodes are connected to the KU's Mega.

I'd think any USB device plugged into the computer should have the same ground, shouldn't it?

KU-DCS_BIOS_dynamic.ino

Posted (edited)

I've tested the Mega pins directly with a multimeter, and I should expect 5V coming out of the pin when the APU is on, shouldn't I? but I get nothing, so I'm wondering whether the code is wrong, or the mega is busted. 

Bort is not recognizing that output either, so I'm not sure what's wrong then. Maybe that line doesn't actually refer to the APU led, or maybe it's not properly coded in DCS BIOS. @No1sonuk any ideas?

Edited by SrSosio
  • Recently Browsing   0 members

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