mirror of https://github.com/ArduPilot/ardupilot
P_HAL_VRBRAIN: Add system_time_was_set to set system_time once
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
1ea08c6396
commit
72234031c0
|
@ -94,6 +94,8 @@ enum VRBRAINUtil::safety_state VRBRAINUtil::safety_switch_state(void)
|
|||
|
||||
void VRBRAINUtil::set_system_clock(uint64_t time_utc_usec)
|
||||
{
|
||||
_system_time_was_set = true;
|
||||
|
||||
timespec ts;
|
||||
ts.tv_sec = time_utc_usec/1.0e6f;
|
||||
ts.tv_nsec = (time_utc_usec % 1000000) * 1000;
|
||||
|
|
Loading…
Reference in New Issue