Peter Hall
Peter Hall
I recommend taking a look at the jitter correction code here: https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_RTC/JitterCorrection.cpp Its is used to convert between on board and off board time stamps in the GPS driver, and...
In the absence of `HAL_FENCE_ENABLED` I have used `!defined(HAL_BUILD_AP_PERIPH)` to hopefully get this building on everything.
I have added back in the vehicle defines as a example of something that I would like to work be does not currently.
Rebased, but not yet re-tested.
Re-tested. 
Battery case is fixed but the RC failsafe still remains, https://github.com/ArduPilot/ardupilot/blob/0b0ca6a9e99e5f22621af1d0199f008ce1c786d0/libraries/AP_Arming/AP_Arming.cpp#L669 The fix is probably to add a pure virtual AP_Vehicle method to check rc fail safe state.
There are lots of options in the fail safe case. Currently this will refuse the mode change. Which may be the right thing to do if too low to transition....
Since the conclusion was that is was better to switch to QLand than refuse the mode change I realized we could just do it in scripting.
This still does not really have a great way to deal with failsafe cases because scripting has no way to tell. We could add bindings for that, or mode reason.
> it wont go into AUTO It currently will, and fly until it breaches the fence. We could update so that it does work as you describe. But I think...