Ok, but how, in the startup script, would we distinguish between an
in-flight restart and and a power-on restart. The data retention spec we
worked out allowed for different handling of each case. It is my
understanding that all crafts will either use fmu or px4io, but never both,
That is why I had placed the calls in both places. In the case of fmu, a
restart will always be a power on restart since there is no concept of in
flight restarts. For px4io both in-flight and power-on are supported.


On Thu, Jan 30, 2014 at 3:56 AM, Lorenz Meier <notifications@github.com>wrote:

> In src/drivers/px4io/px4io.cpp:
>
> > @@ -720,6 +722,8 @@ class PX4IO : public device::CDev
> >  			/* keep waiting for state change for 2 s */
> >  		} while (!safety.armed);
> >
> > +		dm_restart(DM_INIT_REASON_IN_FLIGHT); /* clear the volatile data manager entries */
>
> Same here, it would be cleaner to have a small data man command in the
> startup script.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/PX4/Firmware/pull/619/files#r9298766>
> .
>