Reset a Panda II from code

is there a way to reset the panda II using code

(Other than having the watchdog expire)

Found it, it’s PowerState.RebootDevice()

The only problem is that when I use it,
the managed application doesn’t start anymore.

If I use the reset button it does.

Sorry I keep replying to myself, but just for others,
the following works

PowerState.RebootDevice(false, 1000);

The second parameter is required.

May i ask why yuor device needs to restart it self? I believe any well written out code would not require a restart unless your doing some sort of remote update

You may :slight_smile:

Here’s the deal.
We’re deploying over a hundred panda powered devices in a city wide network.
The devices are connected using a classic radio network (and soms GPRS nodes).

If at some point the local government decides they want to change some settings
on the device, some of those settings might require a reboot to be activated.

We do not want someone to have to go to all those locations to power cycle the device.
That’s why we provide a way for them to reset it over the air.

(This is in fact also a requirement in the original requirement documents distributed by the government)

I agree that a reset should never be used to compensate for errors in the code.
And for the worst case scenario where the application really crashes, there’s always a watchdog.

true indeed and acceptable, i was just wondering , i thought maybe some revision of your code would of been handy but in your case you are correct.
Good luck in your endeavors.

@ DelegateVoid - Just curious, how do you update the firmware if required? Panda doesn’t support infield updates?