apm_planner icon indicating copy to clipboard operation
apm_planner copied to clipboard

Please add flight timer.

Open AndKe opened this issue 8 years ago • 5 comments

I am attaching a piece of MAVProxy code to show how it can be done across platforms...

           flying = False
            if self.mpstate.vehicle_type == 'copter':
                flying = self.master.motors_armed()
            else:
                flying = msg.groundspeed > 3
            if flying and not self.in_air:
                self.in_air = True
                self.start_time = time.mktime(t)
            elif flying and self.in_air:
                self.total_time = time.mktime(t) - self.start_time
                self.console.set_status('FlightTime', 'FlightTime %u:%02u' % (int(self.total_time)/60, int(self.total_time)%60))
            elif not flying and self.in_air:
                self.in_air = False
                self.total_time = time.mktime(t) - self.start_time
                self.console.set_status('FlightTime', 'FlightTime %u:%02u' % (int(self.total_time)/60, int(self.total_time)%60))

AndKe avatar Feb 23 '18 19:02 AndKe

Where do you want it? In a special view or somehow in the menu bar - perhaps in the gap between the mode and the serial parameters? Perhaps like this: menubar

Arne-W avatar Feb 23 '18 23:02 Arne-W

You should create widget that can be added to the desktop, or add it to the unmanned system widget.

Or you can publish it as a parameter to show in the InfoView

Or add it to the PFD

Some suggestions

billbonney avatar Feb 23 '18 23:02 billbonney

@billbonney seems you are the best one to implement - having those great ideas :wink: :smiley:

Arne-W avatar Feb 24 '18 00:02 Arne-W

I think this kind of info kind of belong in Info "View/Quick" tab. However, Other essential info, like voltage and throttle level could be placed a more prominent place, like the mockup from @Arne-W or in PFD

AndKe avatar Feb 24 '18 06:02 AndKe

You could add it to the MAP. In anywise, i can help somebody with how to implement a widget if required, but I don't have time to do it myself at the moment

billbonney avatar Feb 24 '18 10:02 billbonney