Skip to content

Commit

Permalink
Fixed missing return statements and wrong return types in LinuxSerial…
Browse files Browse the repository at this point in the history
…Device class, added virtual destructor to HardDriver class.
  • Loading branch information
Dino Hüllmann committed Jan 9, 2017
1 parent 542b36d commit 78b3b2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions osdk-core/inc/DJI_HardDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class HardDriver
{
public:
HardDriver() {}
virtual ~HardDriver() {}

/*! @note How to use
* In order to provide platform crossable DJI onboardSDK library,
Expand Down
8 changes: 4 additions & 4 deletions platform/linux/inc/LinuxSerialDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class LinuxSerialDevice : public HardDriver {
void setDevice(std::string device);

//! Public interfaces to private functions. Use these functions to validate your serial connection
int checkBaudRate(uint8_t (&buf)[BUFFER_SIZE]) {_checkBaudRate(buf);}
int setSerialPureTimedRead() {_serialConfig(m_baudrate,8,'N',1, true);}
int unsetSerialPureTimedRead() {_serialConfig(m_baudrate,8,'N',1, false);}
int serialRead(unsigned char *buf, int len) {_serialRead(buf,len);}
int checkBaudRate(uint8_t (&buf)[BUFFER_SIZE]) {return _checkBaudRate(buf);}
bool setSerialPureTimedRead() {return _serialConfig(m_baudrate,8,'N',1, true);}
bool unsetSerialPureTimedRead() {return _serialConfig(m_baudrate,8,'N',1, false);}
int serialRead(unsigned char *buf, int len) {return _serialRead(buf,len);}

//! Start of DJI_HardDriver virtual function implementations
size_t send(const uint8_t *buf, size_t len);
Expand Down

0 comments on commit 78b3b2d

Please sign in to comment.