@@ -45,6 +45,7 @@ public class System {
4545 private final LazyPlugin <Info > info ;
4646 private final LazyPlugin <LogFiles > logFiles ;
4747 private final LazyPlugin <ManualControl > manualControl ;
48+ private final LazyPlugin <MavlinkDirect > mavlinkDirect ;
4849 private final LazyPlugin <Mission > mission ;
4950 private final LazyPlugin <MissionRaw > missionRaw ;
5051 private final LazyPlugin <MissionRawServer > missionRawServer ;
@@ -58,7 +59,6 @@ public class System {
5859 private final LazyPlugin <TelemetryServer > telemetryServer ;
5960 private final LazyPlugin <Transponder > transponder ;
6061 private final LazyPlugin <Tune > tune ;
61- private final LazyPlugin <MavlinkDirect > mavlinkDirect ;
6262
6363 /**
6464 * Create a System object. The plugins are initialized lazily, when the corresponding
@@ -91,6 +91,7 @@ public System(@NonNull String host, int port) {
9191 info = LazyPlugin .from (() -> new Info (host , port ));
9292 logFiles = LazyPlugin .from (() -> new LogFiles (host , port ));
9393 manualControl = LazyPlugin .from (() -> new ManualControl (host , port ));
94+ mavlinkDirect = LazyPlugin .from (() -> new MavlinkDirect (host , port ));
9495 mission = LazyPlugin .from (() -> new Mission (host , port ));
9596 missionRaw = LazyPlugin .from (() -> new MissionRaw (host , port ));
9697 missionRawServer = LazyPlugin .from (() -> new MissionRawServer (host , port ));
@@ -104,7 +105,6 @@ public System(@NonNull String host, int port) {
104105 telemetryServer = LazyPlugin .from (() -> new TelemetryServer (host , port ));
105106 transponder = LazyPlugin .from (() -> new Transponder (host , port ));
106107 tune = LazyPlugin .from (() -> new Tune (host , port ));
107- mavlinkDirect = LazyPlugin .from (() -> new MavlinkDirect (host , port ));
108108 }
109109
110110 @ NonNull
@@ -172,6 +172,11 @@ public ManualControl getManualControl() {
172172 return manualControl .get ();
173173 }
174174
175+ @ NonNull
176+ public MavlinkDirect getMavlinkDirect () {
177+ return mavlinkDirect .get ();
178+ }
179+
175180 @ NonNull
176181 public Mission getMission () {
177182 return mission .get ();
@@ -238,9 +243,6 @@ public Tune getTune() {
238243 return tune .get ();
239244 }
240245
241- @ NonNull
242- public MavlinkDirect getMavlinkDirect () { return mavlinkDirect .get (); }
243-
244246 /**
245247 * Dispose of all the plugins.
246248 */
@@ -258,6 +260,7 @@ public void dispose() {
258260 info .dispose ();
259261 logFiles .dispose ();
260262 manualControl .dispose ();
263+ mavlinkDirect .dispose ();
261264 mission .dispose ();
262265 missionRaw .dispose ();
263266 missionRawServer .dispose ();
@@ -271,6 +274,5 @@ public void dispose() {
271274 telemetryServer .dispose ();
272275 transponder .dispose ();
273276 tune .dispose ();
274- mavlinkDirect .dispose ();
275277 }
276278}
0 commit comments