AP_HAL_Linux: reorder members and methods and use C++ initializer
This commit is contained in:
parent
a382ce2b0c
commit
ec5d0b6c08
@ -20,9 +20,8 @@ using namespace Linux;
|
||||
/*
|
||||
constructor
|
||||
*/
|
||||
LinuxI2CDriver::LinuxI2CDriver(AP_HAL::Semaphore* semaphore, const char *device) :
|
||||
LinuxI2CDriver::LinuxI2CDriver(AP_HAL::Semaphore* semaphore, const char *device) :
|
||||
_semaphore(semaphore),
|
||||
_fd(-1),
|
||||
_device(device)
|
||||
{
|
||||
}
|
||||
|
@ -41,11 +41,12 @@ public:
|
||||
AP_HAL::Semaphore* get_semaphore() { return _semaphore; }
|
||||
|
||||
private:
|
||||
AP_HAL::Semaphore* _semaphore;
|
||||
bool set_address(uint8_t addr);
|
||||
int _fd;
|
||||
|
||||
AP_HAL::Semaphore* _semaphore;
|
||||
const char *_device = NULL;
|
||||
int _fd = -1;
|
||||
uint8_t _addr;
|
||||
const char *_device;
|
||||
};
|
||||
|
||||
#endif // __AP_HAL_LINUX_I2CDRIVER_H__
|
||||
|
Loading…
Reference in New Issue
Block a user