1166,25 → 1166,25 |
|
void MKTool::new_NaviData(sRxData RX) |
{ |
Navi.Current.Longitude = ToolBox::Data2Long(RX.Decode, 0, true); |
Navi.Current.Latitude = ToolBox::Data2Long(RX.Decode, 4, true); |
Navi.Current.Altitude = ToolBox::Data2Long(RX.Decode, 8, true); |
Navi.Target.Longitude = ToolBox::Data2Long(RX.Decode, 16, true); |
Navi.Target.Latitude = ToolBox::Data2Long(RX.Decode, 20, true); |
Navi.Target.Altitude = ToolBox::Data2Long(RX.Decode, 24, true); |
Navi.Current.Longitude = ToolBox::Data2Long(RX.Decode, N_CUR_LONGITUDE, true); |
Navi.Current.Latitude = ToolBox::Data2Long(RX.Decode, N_CUR_LATITUDE, true); |
Navi.Current.Altitude = ToolBox::Data2Long(RX.Decode, N_CUR_ALTITUDE, true); |
Navi.Target.Longitude = ToolBox::Data2Long(RX.Decode, N_TAR_LONGITUDE, true); |
Navi.Target.Latitude = ToolBox::Data2Long(RX.Decode, N_TAR_LATITUDE, true); |
Navi.Target.Altitude = ToolBox::Data2Long(RX.Decode, N_TAR_ALTITUDE, true); |
|
le_CDistance->setText(QString("%1 cm").arg(ToolBox::Data2Int(RX.Decode, 52))); |
le_CWPA->setText(QString("%1").arg(RX.Decode[56])); |
le_CWPT->setText(QString("%1").arg(RX.Decode[57])); |
le_CSats->setText(QString("%1").arg(RX.Decode[58])); |
le_CDistance->setText(QString("%1 cm").arg(ToolBox::Data2Int(RX.Decode, N_HOME_DISTANCE))); |
le_CWPA->setText(QString("%1").arg(RX.Decode[N_WP_INDEX])); |
le_CWPT->setText(QString("%1").arg(RX.Decode[N_WP_NUMBER])); |
le_CSats->setText(QString("%1").arg(RX.Decode[N_SATS_IN_USER])); |
|
qwt_Rate->setValue(double(ToolBox::Data2Int(RX.Decode, 61, true))); |
qwt_Rate->setValue(double(ToolBox::Data2Int(RX.Decode, N_VARIOMETER, true))); |
|
le_CTime->setText(QString("%1 sec.").arg(ToolBox::Data2Int(RX.Decode, 63))); |
le_CTime->setText(QString("%1 sec.").arg(ToolBox::Data2Int(RX.Decode, N_FLYING_TIME))); |
|
bar_UBAT->setValue(RX.Decode[65]); |
bar_UBAT->setValue(RX.Decode[N_UBAT]); |
|
double Speed = double((ToolBox::Data2Int(RX.Decode, 66)) / 10.0); |
double Speed = double((ToolBox::Data2Int(RX.Decode, N_GROUND_SPEED)) / 10.0); |
|
if ((Speed > 4.5) && SpeedMeter->property("END") == 5) |
{ |
1202,12 → 1202,12 |
|
SpeedMeter->setValue(Speed); |
|
Compass->setValue(ToolBox::Data2Int(RX.Decode, 70)); //(68) |
Compass->setValue(ToolBox::Data2Int(RX.Decode, N_COMAPSS_HEADING)); //(68) |
|
bar_RX->setValue(RX.Decode[74]); |
bar_RX->setValue(RX.Decode[N_RC_QUALITY]); |
|
int Nick = RX.Decode[72]; |
int Roll = RX.Decode[73]; |
int Nick = RX.Decode[N_ANGLE_NICK]; |
int Roll = RX.Decode[N_ANGLE_ROLL]; |
|
if (Roll > 128) |
Roll = Roll - 255; |