AP_HAL_Linux: Scheduler: include cleanups

While at it also remove some wrong whitespaces.
This commit is contained in:
Lucas De Marchi 2016-02-02 20:09:39 -02:00
parent adfa03ce69
commit 27999b339d
2 changed files with 17 additions and 28 deletions

View File

@ -1,21 +1,22 @@
#include "Scheduler.h"
#include <algorithm>
#include <errno.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <unistd.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#include "Scheduler.h"
#include "Storage.h"
#include "RCInput.h"
#include "RPIOUARTDriver.h"
#include "SPIUARTDriver.h"
#include "Storage.h"
#include "UARTDriver.h"
#include "Util.h"
#include "SPIUARTDriver.h"
#include "RPIOUARTDriver.h"
#include <algorithm>
#include <poll.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
#include <rpcmem.h>
@ -24,7 +25,6 @@
#include <AP_HAL_Linux/qflight/qflight_buffer.h>
#endif
using namespace Linux;
extern const AP_HAL::HAL& hal;
@ -52,8 +52,6 @@ extern const AP_HAL::HAL& hal;
#endif // CONFIG_HAL_BOARD_SUBTYPE
Scheduler::Scheduler()
{}
@ -355,8 +353,8 @@ void *Scheduler::_timer_thread(void* arg)
printf("Initialising rpcmem\n");
rpcmem_init();
#endif
/*
/*
this aims to run at an average of 1kHz, so that it can be used
to drive 1kHz processes without drift
*/
@ -524,5 +522,3 @@ void Scheduler::stop_clock(uint64_t time_usec)
_run_io();
}
}
#endif // CONFIG_HAL_BOARD

View File

@ -1,11 +1,8 @@
#ifndef __AP_HAL_LINUX_SCHEDULER_H__
#define __AP_HAL_LINUX_SCHEDULER_H__
#pragma once
#include "AP_HAL_Linux.h"
#include "Semaphores.h"
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#include <sys/time.h>
#include <pthread.h>
@ -108,7 +105,3 @@ private:
Semaphore _timer_semaphore;
Semaphore _io_semaphore;
};
#endif // CONFIG_HAL_BOARD
#endif // __AP_HAL_LINUX_SCHEDULER_H__