mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-25 14:56:57 +08:00
DataFlash: use AP_Mission singleton
This commit is contained in:
1 parent
9b561c76e2
commit
590eb86a45
7 files changed
+6
-30
No files matched your search
@@ -134,12 +134,6 @@ void DFMessageWriter_WriteSysInfo::reset()
|
||||
stage = ws_blockwriter_stage_init;
|
||||
}
|
||||
|
||||
void DFMessageWriter_DFLogStart::set_mission(const AP_Mission *mission)
|
||||
{
|
||||
_writeentiremission.set_mission(mission);
|
||||
}
|
||||
|
||||
|
||||
void DFMessageWriter_WriteSysInfo::process() {
|
||||
const AP_FWVersion &fwver = AP::fwversion();
|
||||
|
||||
@@ -188,6 +182,12 @@ void DFMessageWriter_WriteSysInfo::process() {
|
||||
}
|
||||
|
||||
void DFMessageWriter_WriteEntireMission::process() {
|
||||
const AP_Mission *_mission = AP::mission();
|
||||
if (_mission == nullptr) {
|
||||
_finished = true;
|
||||
return;
|
||||
}
|
||||
|
||||
switch(stage) {
|
||||
|
||||
case em_blockwriter_stage_init:
|
||||
@@ -234,9 +234,3 @@ void DFMessageWriter_WriteEntireMission::reset()
|
||||
stage = em_blockwriter_stage_init;
|
||||
_mission_number_to_send = 0;
|
||||
}
|
||||
|
||||
|
||||
void DFMessageWriter_WriteEntireMission::set_mission(const AP_Mission *mission)
|
||||
{
|
||||
_mission = mission;
|
||||
}
|
||||
Reference in new issue
Block a user