Ah, OK, I misunderstood what you meant. Looking at things, I found what I
was looking for earlier, a way to determine whether the app is connected to
the drone. That's definitely what I prefer to maintaining a state flag in
the app. Please stand by...


On Sat, Apr 5, 2014 at 6:12 PM, Arthur Benemann <notifications@github.com>wrote:

> In DroidPlanner/src/org/droidplanner/DroidPlannerApp.java:
>
> >  		drone.events.notifyDroneEvent(DroneEventsType.DISCONNECTED);
> >  	}
> > +	
> > +	public Drone getDrone() {
> > +		return drone;
> > +	}
> > +	
> > +	public boolean isDroneConnected() {
>
> No problems with accessing the global drone variable, the issue is on that
> duplication of the connected/disconnected state. But don't worry when I
> have some time to review/merge your PR I'll fix anything that's bothering
> me.
> ... <#145342a588e0d5f4_>
> On Apr 5, 2014 7:24 PM, "Kelly Schrock" <notifications@github.com> wrote:
> > In DroidPlanner/src/org/droidplanner/DroidPlannerApp.java: > > >
> drone.events.notifyDroneEvent(DroneEventsType.DISCONNECTED); > > } > > + >
> > + public Drone getDrone() { > > + return drone; > > + } > > + > > +
> public boolean isDroneConnected() { > > I'm not crazy about methods
> returning things from global scope, but the > Drone instance in
> DroidPlannerApp does seem to be a singleton (being an > instance variable
> of DroidPlannerApp), and it was a cleaner way to get > access to the Drone
> instance from the preferences than anything else I > could think of. I
> could certainly think of another way to get access to it > from the
> preferences if you prefer. > ... <#14533fe42fedd988_> > On Sat, Apr 5, 2014
> at 5:05 PM, Arthur Benemann <notifications@github.com>wrote: In
> DroidPlanner/src/org/droidplanner/DroidPlannerApp.java: >
> drone.events.notifyDroneEvent(DroneEventsType.DISCONNECTED); > } > + > +
> public Drone getDrone() { > + return drone; > + } > + > + public boolean
> isDroneConnected() { I'm just a little worried about this method, but I
> don't have an immediate solution. -- Reply to this email directly or view
> it on GitHub<
> https://github.com/DroidPlanner/droidplanner/pull/718/files#r11323486> .
> -- Reply to this email directly or view it on GitHub<
> https://github.com/DroidPlanner/droidplanner/pull/718/files#r11323570> .
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/DroidPlanner/droidplanner/pull/718/files#r11323674>
> .
>