outbaxx Posted February 25, 2021 Share Posted February 25, 2021 Hi guys, I need some help. The issue:The AJS37 Viggen destination indicator show letters with different colors depending on in what state the mode selector is in.But the output is the same, for example, in Nav-mode “M” is shown in white, and in Spa-mode “M” is shown in red, but both outputs are “M”. So I need to see if the mode selector is in SPA and then set the color red in my display. But I don’t know how to check that. Anyone who knows? RegardsF Link to comment Share on other sites More sharing options...
CorporalCarrot Posted February 26, 2021 Share Posted February 26, 2021 Which aircraft is this for? Link to comment Share on other sites More sharing options...
outbaxx Posted February 26, 2021 Author Share Posted February 26, 2021 Which aircraft is this for?Sorry, I updated the first post, it’s the AJS37 Viggen. Link to comment Share on other sites More sharing options...
DeadMeat Posted February 26, 2021 Share Posted February 26, 2021 (edited) Change your documentation reference to advanced and look at the output for the master mode selector. You can check the output when you change position with this: void onMasterModeSelectChange(unsigned int newValue) { /* your code here */ } DcsBios::IntegerBuffer masterModeSelectBuffer(0x4614, 0xe000, 13, onMasterModeSelectChange); Edited February 26, 2021 by DeadMeat My mods --> Mil-spec upgrades for TM Warthog, Hornet & Cougar grips | Mil-spec upgrade for TM Warthog throttle | Real Tornado gear switch modded into gear and hook lever switches Link to comment Share on other sites More sharing options...
CorporalCarrot Posted February 26, 2021 Share Posted February 26, 2021 (edited) You beat me to it @DeadMeat XD If you've not used this format before, outbaxx, you put in your code in the /*your code here*/ section, where you can output the right colour to your display using the library commands relevant to your display. The variable 'newValue' is how DCS reports the state back to you. See the documentation in DCS-BIOS to understand what is returned for each state (or do some experimentation with DCS and output the 'newValue' variable to either your screen or the serial monitor. Edited February 26, 2021 by CorporalCarrot Link to comment Share on other sites More sharing options...
outbaxx Posted February 26, 2021 Author Share Posted February 26, 2021 Change your documentation reference to advanced and look at the output for the master mode selector. You can check the output when you change position with this: void onMasterModeSelectChange(unsigned int newValue) { /* your code here */ } DcsBios::IntegerBuffer masterModeSelectBuffer(0x4614, 0xe000, 13, onMasterModeSelectChange); Of course, I can do that check there and set a value to an int/bool and use that in the other function, I’ve done similar in another sketch, but now I got stuck in another thought.Thank Guys!!RegardsF Link to comment Share on other sites More sharing options...
Recommended Posts