Commit f4f37122 authored by pixhawk's avatar pixhawk

test

parents d8361352 0d757aae
0 0.9 1.1 -0.6 0 1 1 0.1 2000
This diff is collapsed.
This diff is collapsed.
# Onboard parameters for system MAV 042
#
# MAV ID COMPONENT ID PARAM NAME VALUE (FLOAT)
42 200 ACC_NAV_OFFS_X 0
42 200 ACC_NAV_OFFS_Y 0
42 200 ACC_NAV_OFFS_Z -1000
42 200 ACC_OFFSET_X 0
42 200 ACC_OFFSET_Y 0
42 200 ACC_OFFSET_Z 0
42 200 ATT_KAL_IYAW 1
42 200 ATT_KAL_KACC 0.0033
42 200 ATT_OFFSET_X 0
42 200 ATT_OFFSET_Y 0
42 200 ATT_OFFSET_Z -0.08
42 200 CAM_EXP 1000
42 200 CAM_INTERVAL 36000
42 200 DEBUG_1 0
42 200 DEBUG_2 0
42 200 DEBUG_3 0
42 200 DEBUG_4 0
42 200 DEBUG_5 0
42 200 DEBUG_6 0
42 200 GYRO_OFFSET_X 29760
42 200 GYRO_OFFSET_Y 29860
42 200 GYRO_OFFSET_Z 29877
42 200 MIX_OFFSET 1
42 200 MIX_POSITION 0
42 200 MIX_POS_YAW 0
42 200 MIX_REMOTE 1
42 200 MIX_Z_POSITION 0
42 200 PID_ATT_AWU 0.3
42 200 PID_ATT_D 30
42 200 PID_ATT_I 60
42 200 PID_ATT_P 90
42 200 PID_POS_AWU 5
42 200 PID_POS_D 2
42 200 PID_POS_I 0.35
42 200 PID_POS_P 1.6
42 200 PID_POS_Z_AWU 3
42 200 PID_POS_Z_D 0.2
42 200 PID_POS_Z_I 0.1
42 200 PID_POS_Z_LIM 0.3
42 200 PID_POS_Z_P 0.5
42 200 PID_YAWPOS_AWU 1
42 200 PID_YAWPOS_D 0.5
42 200 PID_YAWPOS_I 0.1
42 200 PID_YAWPOS_P 1
42 200 PID_YAWSPEED_D 0
42 200 PID_YAWSPEED_I 10
42 200 PID_YAWSPEED_P 30
42 200 PID_YAWSPE_AWU 1
42 200 POS_SP_ACCEPT 0
42 200 POS_SP_X 1.1
42 200 POS_SP_Y 1.1
42 200 POS_SP_YAW 0
42 200 POS_SP_Z -0.8
42 200 POS_TIMEOUT 2e+06
42 200 RC_NICK_CHAN 1
42 200 RC_ROLL_CHAN 2
42 200 RC_SAFETY_CHAN 5
42 200 RC_THRUST_CHAN 3
42 200 RC_TRIM_CHAN 0
42 200 RC_TUNE_CHAN1 7
42 200 RC_TUNE_CHAN2 5
42 200 RC_TUNE_CHAN3 6
42 200 RC_TUNE_CHAN4 8
42 200 RC_YAW_CHAN 4
42 200 SEND_DEBUGCHAN 0
42 200 SLOT_ATTITUDE 1
42 200 SLOT_CONTROL 0
42 200 SLOT_RAW_IMU 0
42 200 SLOT_RC 0
42 200 SYS_COMP_ID 200
42 200 SYS_ID 42
42 200 SYS_IMU_RESET 0
42 200 SYS_SW_VER 2005
42 200 SYS_TYPE 2
42 200 UART_0_BAUD 115200
42 200 UART_1_BAUD 57600
42 200 VEL_DAMP 0.95
42 200 VEL_OFFSET_X 0
42 200 VEL_OFFSET_Y 0
42 200 VEL_OFFSET_Z 0
42 200 VIS_YAWCORR 0
......@@ -134,6 +134,8 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit localizationChanged(this, status.position_fix);
emit visionLocalizationChanged(this, status.vision_fix);
emit gpsLocalizationChanged(this, status.gps_fix);
qDebug() << "ATT CONTROL IS" << status.control_att;
}
break;
default:
......
......@@ -383,11 +383,22 @@ void QGCParamWidget::loadParameters()
if (mav->getUASID() == wpParams.at(0).toInt())
{
qDebug() << "PARAM right uas";
bool changed = false;
int component = wpParams.at(1).toInt();
QString parameterName = wpParams.at(2);
if (!parameters.contains(component) || parameters.value(component)->value(parameterName, 0.0f) != (float)wpParams.at(3).toDouble())
{
changed = true;
}
// Set parameter value
addParameter(wpParams.at(0).toInt(), wpParams.at(1).toInt(), wpParams.at(2), wpParams.at(3).toDouble());
if (changedValues.contains(wpParams.at(1).toInt()))
if (changed)
{
qDebug() << "PARAM changed contains";
if (changedValues.value(wpParams.at(1).toInt())->contains(wpParams.at(1)))
{
......@@ -403,6 +414,24 @@ void QGCParamWidget::loadParameters()
// set param to be changed
// QGCParamWidget::parameterItemChanged(QTreeWidgetItem* current, column);
// Create changed values data structure if necessary
if (!changedValues.contains(wpParams.at(1).toInt()))
{
changedValues.insert(wpParams.at(1).toInt(), new QMap<QString, float>());
}
// Add to changed values
if (changedValues.value(wpParams.at(1).toInt())->contains(wpParams.at(2)))
{
changedValues.value(wpParams.at(1).toInt())->remove(wpParams.at(2));
}
changedValues.value(wpParams.at(1).toInt())->insert(wpParams.at(2), (float)wpParams.at(3).toDouble());
qDebug() << "MARKING COMP" << wpParams.at(1).toInt() << "PARAM" << wpParams.at(2) << "VALUE" << (float)wpParams.at(3).toDouble() << "AS CHANGED";
// Mark in UI
}
}
}
......
0 1.17 0.98 -0.8 0 1 10.1 2000
1 0.5 0.98 -0.8 0 1 00.1 2000
2 1.1 0.98 -0.8 0 1 00.1 2000
3 1.1 1.4 -0.8 0 1 00.1 2000
0 1.1 1.1 -0.8 0 1 1 0.1 5000
1 0.7 0.7 -0.8 0 1 0 0.1 3000
2 1.5 0.7 -0.8 0 1 0 0.1 3000
3 1.5 1.5 -0.8 0 1 0 0.1 3000
4 0.7 1.5 -0.8 0 1 0 0.1 3000
5 1.1 1.1 -0.8 0 1 0 0.1 5000
6 1.1 1.1 0 0 1 0 0.1 2000
0 0.7 0.7 -0.7 0 1 1 0.2 5000
1 1.5 0.7 -0.7 0 1 0 0.2 2000
2 1.5 1.5 -0.7 0 1 0 0.2 2000
3 0.7 1.5 -0.7 0 1 0 0.2 2000
0 0.7 0.6 -0.7 0 1 1 0.1 2000
1 1.5 0.6 -0.7 0 1 0 0.1 2000
2 1.5 1.7 -0.7 0 1 0 0.1 2000
3 0.7 1.7 -0.7 0 1 0 0.1 2000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment