mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
HAL_SITL: fixed build error
This commit is contained in:
parent
4b298aa80e
commit
0873e54cc0
@ -80,13 +80,17 @@ static char *new_argv[100];
|
||||
/*
|
||||
save watchdog data
|
||||
*/
|
||||
static void watchdog_save(const uint32_t *data, uint32_t nwords)
|
||||
static bool watchdog_save(const uint32_t *data, uint32_t nwords)
|
||||
{
|
||||
int fd = ::open("persistent.dat", O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
bool ret = false;
|
||||
if (fd != -1) {
|
||||
::write(fd, data, nwords*4);
|
||||
if (::write(fd, data, nwords*4) == nwords*4) {
|
||||
ret = true;
|
||||
}
|
||||
::close(fd);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user