I am currently working on a C++ gauge with Doug that involves an autopilot. Although most of this portion is completed and working as expected, there seems to be an issue between the gauge input versus the display on the panel (via an xml gauge) with regards to the MACH variable .
When the desired MACH number is input into our gauge it reads correct, but the display always reads 3.00M or 0.00M.
Our code segment:
The math is sound. Has anyone ever faced this issue before or has a solution. Thanks for any ideas or suggestions
Greg
When the desired MACH number is input into our gauge it reads correct, but the display always reads 3.00M or 0.00M.
Our code segment:
Code:
ap[APDisplaySwitch].mach = atof(RadioInput);
RadioInput[0] = 0;
switch (APActiveSwitch)
{
case 0:
send_key_event(KEY_AP_MACH_VAR_SET, (int)(ap[0].mach / 3.2 * 65536));
break;
case 1:
send_key_event(KEY_AP_MACH_VAR_SET, (int)(ap[1].mach / 3.2 * 65536));
break;
}
The math is sound. Has anyone ever faced this issue before or has a solution. Thanks for any ideas or suggestions
Greg
