Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Apr 8, 2016
1 parent c647365 commit 04e9a44
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 34 deletions.
6 changes: 2 additions & 4 deletions ArduinoButton.h
Expand Up @@ -15,9 +15,7 @@ class ArduinoButton : public IButton
ArduinoButton(inputid_t id, inputpin_t pin, bool activeLow = true,
bool pullUp = true);

virtual ~ArduinoButton()
{
}
virtual ~ArduinoButton() {}

/*!
* \brief Gets the pin the button is attached to.
Expand All @@ -43,7 +41,7 @@ class ArduinoButton : public IButton
private:
inputpin_t m_pin; //!< Pin button is attached to
bool m_activeLow; //!< If the button logic is active low
bool m_pullUp; //!< If the button pin is pulled up
bool m_pullUp; //!< If the button pin is pulled up
};

#endif
4 changes: 1 addition & 3 deletions ArduinoJoystick.h
Expand Up @@ -14,9 +14,7 @@ class ArduinoJoystick : public IJoystick
public:
ArduinoJoystick(inputid_t id, inputpin_t adc);

virtual ~ArduinoJoystick()
{
}
virtual ~ArduinoJoystick() {}

protected:
inputanalog_t getPhysicalValue() const;
Expand Down
4 changes: 1 addition & 3 deletions ArduinoMatrixButton.h
Expand Up @@ -14,9 +14,7 @@ class ArduinoMatrixButton : public IButton
public:
ArduinoMatrixButton(inputid_t id, inputpin_t colPin, inputpin_t rowPin);

virtual ~ArduinoMatrixButton()
{
}
virtual ~ArduinoMatrixButton() {}

/*!
* \brief Gets the pin attached to the matrix column for this button.
Expand Down
4 changes: 1 addition & 3 deletions IButton.cpp
Expand Up @@ -16,9 +16,7 @@ IButton::IButton(inputid_t id, inputtime_t debounceDelay)
{
}

IButton::~IButton()
{
}
IButton::~IButton() {}

/*!
* \brief Sets the debounce delay time.
Expand Down
4 changes: 1 addition & 3 deletions IInputDevice.h
Expand Up @@ -23,9 +23,7 @@ class IInputDevice
{
}

virtual ~IInputDevice()
{
}
virtual ~IInputDevice() {}

/*!
* \brief Retrieves the ID of this device.
Expand Down
4 changes: 1 addition & 3 deletions IJoystick.cpp
Expand Up @@ -18,9 +18,7 @@ IJoystick::IJoystick(inputid_t id)
setDeadbands(0, 0, 0);
}

IJoystick::~IJoystick()
{
}
IJoystick::~IJoystick() {}

bool IJoystick::poll()
{
Expand Down
2 changes: 1 addition & 1 deletion IJoystick.h
Expand Up @@ -33,7 +33,7 @@ class IJoystick : public IInputDevice
inputanalog_t getRawValue() const { return m_value; }

inputanalog_t getCentredValue() const;
inputanalog_t getValue() const ;
inputanalog_t getValue() const;

void setTransformation(IValueTransform *transform);

Expand Down
6 changes: 2 additions & 4 deletions IValueTransform.h
Expand Up @@ -23,9 +23,7 @@ class IValueTransform
{
}

virtual ~IValueTransform()
{
};
virtual ~IValueTransform(){};

/*!
* \brief Perform the value transformation.
Expand All @@ -35,7 +33,7 @@ class IValueTransform
virtual inputanalog_t transform(inputanalog_t raw) const = 0;

protected:
inputanalog_t m_fromLow; //!< Lowest input value
inputanalog_t m_fromLow; //!< Lowest input value
inputanalog_t m_fromHigh; //!< Highest input value
};

Expand Down
6 changes: 2 additions & 4 deletions LinearTransform.h
Expand Up @@ -25,9 +25,7 @@ class LinearTransform : public IValueTransform
{
}

virtual ~LinearTransform()
{
}
virtual ~LinearTransform() {}

/*!
* \copydoc IValueTransform::transform
Expand All @@ -41,7 +39,7 @@ class LinearTransform : public IValueTransform
}

private:
inputanalog_t m_toLow; //!< Lowest output value
inputanalog_t m_toLow; //!< Lowest output value
inputanalog_t m_toHigh; //!< Highest output value
};

Expand Down
8 changes: 4 additions & 4 deletions UniversalInputManager.h
Expand Up @@ -13,7 +13,7 @@
*/
struct UIMListNode
{
UIMListNode *next; //!< Pointer to next node
UIMListNode *next; //!< Pointer to next node
IInputDevice *device; //!< Pointer to input device
};

Expand Down Expand Up @@ -54,12 +54,12 @@ class UniversalInputManager
bool addNewJoystick(inputid_t id, inputpin_t pin);

private:
size_t m_numDevices; //!< Number of added devices
size_t m_numDevices; //!< Number of added devices
UIMListNode *m_listHead; //!< Pointer to the head node of the linked list
IUniversalInputCallback *m_callback; //!< Callback handler

bool m_defaultActiveLow; //!< Default active low state for new buttons
bool m_defaultPullUp; //!< Default pull up state for new buttons
bool m_defaultActiveLow; //!< Default active low state for new buttons
bool m_defaultPullUp; //!< Default pull up state for new buttons
inputtime_t m_defaultDebounce; //!< Defautl debounce time for new buttons
};

Expand Down
4 changes: 2 additions & 2 deletions UniversalInputTypes.h
Expand Up @@ -36,9 +36,9 @@ typedef int32_t inputanalog_t;
*/
enum inputtype_t
{
UIT_BUTTON, //!< Buttons inheriting from IButton
UIT_BUTTON, //!< Buttons inheriting from IButton
UIT_JOYSTICK, //!< Joysticks inheriting from IJoystick
UIT_ENCODER //!< Encoders
UIT_ENCODER //!< Encoders
};

#endif

0 comments on commit 04e9a44

Please sign in to comment.