mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 05:41:36 +08:00
Drivers: fix formatting
This commit is contained in:
@@ -59,11 +59,11 @@
|
|||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
|
||||||
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
|
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
|
||||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN14)
|
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN14)
|
||||||
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
|
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
|
||||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN15)
|
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN15)
|
||||||
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
|
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
|
||||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
|
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
|
||||||
|
|
||||||
/* Safety switch button *************************************************************/
|
/* Safety switch button *************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
#ifdef __PX4_POSIX
|
#ifdef __PX4_POSIX
|
||||||
|
|
||||||
#ifndef SIOCDEVPRIVATE
|
#ifndef SIOCDEVPRIVATE
|
||||||
#define SIOCDEVPRIVATE 1
|
#define SIOCDEVPRIVATE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DIOC_GETPRIV SIOCDEVPRIVATE
|
#define DIOC_GETPRIV SIOCDEVPRIVATE
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ __BEGIN_DECLS
|
|||||||
#define pwm_output_values output_pwm_s
|
#define pwm_output_values output_pwm_s
|
||||||
|
|
||||||
#ifndef PWM_OUTPUT_MAX_CHANNELS
|
#ifndef PWM_OUTPUT_MAX_CHANNELS
|
||||||
#define PWM_OUTPUT_MAX_CHANNELS output_pwm_s::PWM_OUTPUT_MAX_CHANNELS
|
#define PWM_OUTPUT_MAX_CHANNELS output_pwm_s::PWM_OUTPUT_MAX_CHANNELS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
* pulses per revolution of wheel
|
* pulses per revolution of wheel
|
||||||
*/
|
*/
|
||||||
RoboClaw(const char *deviceName, uint16_t address,
|
RoboClaw(const char *deviceName, uint16_t address,
|
||||||
uint16_t pulsesPerRev);
|
uint16_t pulsesPerRev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deconstructor
|
* deconstructor
|
||||||
@@ -181,12 +181,12 @@ private:
|
|||||||
int16_t _motor2Overflow;
|
int16_t _motor2Overflow;
|
||||||
|
|
||||||
// private methods
|
// private methods
|
||||||
uint16_t _sumBytes(uint8_t * buf, size_t n);
|
uint16_t _sumBytes(uint8_t *buf, size_t n);
|
||||||
int _sendCommand(e_command cmd, uint8_t * data, size_t n_data, uint16_t & prev_sum);
|
int _sendCommand(e_command cmd, uint8_t *data, size_t n_data, uint16_t &prev_sum);
|
||||||
};
|
};
|
||||||
|
|
||||||
// unit testing
|
// unit testing
|
||||||
int roboclawTest(const char *deviceName, uint8_t address,
|
int roboclawTest(const char *deviceName, uint8_t address,
|
||||||
uint16_t pulsesPerRev);
|
uint16_t pulsesPerRev);
|
||||||
|
|
||||||
// vi:noet:smarttab:autoindent:ts=4:sw=4:tw=78
|
// vi:noet:smarttab:autoindent:ts=4:sw=4:tw=78
|
||||||
|
|||||||
Reference in New Issue
Block a user