Jump to content

Trying to export the UV26 digits on the MI-8


Recommended Posts

Posted

Hello all

I got everything exported from the MI-8, but i miss the UV26 digits.

 

I search everywhere to get this data but no joy.

At the end i made the ka50 solution, export the viewport to the second monitor, but i got this weird effect, the digits are backwards !

 

Any idea?

 

Any solution to get the digits in the correct direction? or another way to get the digits from any device?

 

thanks a lot !!

 

yUgL9e0.jpg

Posted

function parse_indication(indicator_id)
local ret = {}
local li = list_indication(indicator_id)
if li == "" then return nil end
local m = li:gmatch("-----------------------------------------\n([^\n]+)\n([^\n]*)\n")
while true do
       local name, value = m()
       if not name then break end
	ret[name] = value
end
return ret
end

function get_uv26_display()
   local li = parse_indication(4)
   if not li then return "   " end
   if not li.txt_digits then return "   " end
   return li.txt_digits
end

 

The function get_uv26_display() will return the display contents as a three-character string (or three spaces if it is empty, e.g. powered off).

  • Like 1
  • 5 years later...
Posted

Hello All,

Im creating external UFCP for JF17. DCS BIOS and Arduino working great. BUT :D . I fly KA-50 and Mi-8 too. KA-50s UV-26 is working on this panel with the script:

------------------------------------------------------------

void onUv26DisplayChange(char* newValue) {

alpha4.begin(0x70);

alpha4.writeDigitAscii(0, 'K');

alpha4.writeDigitAscii(1, 'A');

alpha4.writeDigitAscii(2, '5');

alpha4.writeDigitAscii(3, '0');

alpha4.writeDisplay();

 

alpha4.begin(0x71);

alpha4.writeDigitAscii(1, newValue[0]);

alpha4.writeDigitAscii(2, newValue[1]);

alpha4.writeDigitAscii(3, newValue[2]);

alpha4.writeDisplay();

}

DcsBios::StringBuffer<3> uv26DisplayBuffer(0x1812, onUv26DisplayChange);

------------------------------------------------------------------------------------------------------

 

My Question is, why it dont work with Mi-8? If some1 know how to fix it it will be the best person on earth ;)

 

For Mi-8:

 

void onget_Uv26_DisplayChange(char* newValue) {

alpha4.begin(0x70);

alpha4.writeDigitAscii(0, 'M');

alpha4.writeDigitAscii(1, 'i');

alpha4.writeDigitAscii(2, '-');

alpha4.writeDigitAscii(3, '8');

alpha4.writeDisplay();

 

alpha4.begin(0x71);

alpha4.writeDigitAscii(0, '-');

alpha4.writeDigitAscii(1, newValue[0]);

alpha4.writeDigitAscii(2, newValue[1]);

alpha4.writeDigitAscii(3, newValue[2]);

alpha4.writeDisplay();

}

DcsBios::StringBuffer<3> get_Uv26_DisplayBuffer(0x1812, onget_Uv26_DisplayChange);

  • Recently Browsing   0 members

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