@@ -202,30 +202,7 @@ type Driver struct {
202
202
// NewDriver creates a driver for the Tello drone. Pass in the UDP port to use for the responses
203
203
// from the drone.
204
204
func NewDriver (port string ) * Driver {
205
- d := & Driver {name : gobot .DefaultName ("Tello" ),
206
- reqAddr : "192.168.10.1:8889" ,
207
- respPort : port ,
208
- videoPort : "11111" ,
209
- Eventer : gobot .NewEventer (),
210
- doneCh : make (chan struct {}, 1 ),
211
- }
212
-
213
- d .AddEvent (ConnectedEvent )
214
- d .AddEvent (FlightDataEvent )
215
- d .AddEvent (TakeoffEvent )
216
- d .AddEvent (LandingEvent )
217
- d .AddEvent (PalmLandingEvent )
218
- d .AddEvent (BounceEvent )
219
- d .AddEvent (FlipEvent )
220
- d .AddEvent (TimeEvent )
221
- d .AddEvent (LogEvent )
222
- d .AddEvent (WifiDataEvent )
223
- d .AddEvent (LightStrengthEvent )
224
- d .AddEvent (SetExposureEvent )
225
- d .AddEvent (VideoFrameEvent )
226
- d .AddEvent (SetVideoEncoderRateEvent )
227
-
228
- return d
205
+ return NewDriverWithIP ("192.168.10.1" , port )
229
206
}
230
207
231
208
// NewDriverWithIP creates a driver for the Tello EDU drone. Pass in the ip address and UDP port to use for the responses
@@ -236,6 +213,7 @@ func NewDriverWithIP(ip string, port string) *Driver {
236
213
respPort : port ,
237
214
videoPort : "11111" ,
238
215
Eventer : gobot .NewEventer (),
216
+ doneCh : make (chan struct {}, 1 ),
239
217
}
240
218
241
219
d .AddEvent (ConnectedEvent )
0 commit comments