mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-115 UAV Control gadget now preserves initial state of metadata when it stops.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1338 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
ef0b307353
commit
adc6385880
@ -79,16 +79,18 @@ void GCSControlGadgetWidget::gcsControlToggle(int state)
|
|||||||
UAVObject::Metadata mdata = getMCC()->getMetadata();
|
UAVObject::Metadata mdata = getMCC()->getMetadata();
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
|
mccInitialData = mdata;
|
||||||
mdata.flightAccess = UAVObject::ACCESS_READONLY;
|
mdata.flightAccess = UAVObject::ACCESS_READONLY;
|
||||||
|
mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
||||||
|
mdata.gcsTelemetryAcked = false;
|
||||||
|
mdata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
||||||
|
mdata.gcsTelemetryUpdatePeriod = 100;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mdata.flightAccess = UAVObject::ACCESS_READWRITE;
|
mdata = mccInitialData;
|
||||||
}
|
}
|
||||||
mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
|
||||||
mdata.gcsTelemetryAcked = false;
|
|
||||||
mdata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
|
||||||
mdata.gcsTelemetryUpdatePeriod = 100;
|
|
||||||
getMCC()->setMetadata(mdata);
|
getMCC()->setMetadata(mdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui_GCSControl *m_gcscontrol;
|
Ui_GCSControl *m_gcscontrol;
|
||||||
ManualControlCommand* getMCC();
|
ManualControlCommand* getMCC();
|
||||||
|
UAVObject::Metadata mccInitialData;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* GCSControlGADGETWIDGET_H_ */
|
#endif /* GCSControlGADGETWIDGET_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user