1
- package org .droidplanner .services .android .core .drone .autopilot ;
1
+ package org .droidplanner .services .android .core .drone .autopilot . generic ;
2
2
3
3
import android .os .Bundle ;
4
4
import android .text .TextUtils ;
31
31
import org .droidplanner .services .android .core .MAVLink .command .doCmd .MavLinkDoCmds ;
32
32
import org .droidplanner .services .android .core .drone .DroneEvents ;
33
33
import org .droidplanner .services .android .core .drone .DroneInterfaces ;
34
+ import org .droidplanner .services .android .core .drone .autopilot .MavLinkDrone ;
34
35
import org .droidplanner .services .android .core .drone .variables .State ;
36
+ import org .droidplanner .services .android .core .drone .variables .StreamRates ;
35
37
import org .droidplanner .services .android .core .drone .variables .Type ;
36
38
import org .droidplanner .services .android .core .model .AutopilotWarningParser ;
37
39
import org .droidplanner .services .android .utils .CommonApiUtils ;
42
44
*
43
45
* Created by Fredia Huya-Kouadio on 9/10/15.
44
46
*/
45
- public abstract class CommonMavLinkDrone implements MavLinkDrone {
47
+ public abstract class GenericMavLinkDrone implements MavLinkDrone {
46
48
47
49
private final MAVLinkStreams .MAVLinkOutputStream MavClient ;
48
50
49
51
private final DroneEvents events ;
50
52
protected final Type type ;
51
53
private final State state ;
54
+ private final StreamRates streamRates ;
52
55
53
56
private final DroneInterfaces .AttributeEventListener attributeListener ;
54
57
@@ -59,11 +62,12 @@ public abstract class CommonMavLinkDrone implements MavLinkDrone {
59
62
protected final Attitude attitude = new Attitude ();
60
63
protected final Vibration vibration = new Vibration ();
61
64
62
- protected CommonMavLinkDrone (DroneInterfaces .Handler handler , MAVLinkStreams .MAVLinkOutputStream mavClient , AutopilotWarningParser warningParser , DroneInterfaces .AttributeEventListener listener ) {
65
+ protected GenericMavLinkDrone (DroneInterfaces .Handler handler , MAVLinkStreams .MAVLinkOutputStream mavClient , AutopilotWarningParser warningParser , DroneInterfaces .AttributeEventListener listener ) {
63
66
this .MavClient = mavClient ;
64
67
65
68
events = new DroneEvents (this , handler );
66
69
this .type = new Type (this );
70
+ this .streamRates = new StreamRates (this );
67
71
this .state = new State (this , handler , warningParser );
68
72
69
73
this .attributeListener = listener ;
@@ -84,6 +88,11 @@ public void addDroneListener(DroneInterfaces.OnDroneListener listener) {
84
88
events .addDroneListener (listener );
85
89
}
86
90
91
+ @ Override
92
+ public StreamRates getStreamRates () {
93
+ return streamRates ;
94
+ }
95
+
87
96
@ Override
88
97
public void removeDroneListener (DroneInterfaces .OnDroneListener listener ) {
89
98
events .removeDroneListener (listener );
0 commit comments