mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
fix macos compile issues (#22173)
* fix macos compile issues * remove unused variable
This commit is contained in:
@@ -50,7 +50,7 @@ __END_DECLS
|
|||||||
|
|
||||||
static bool _led_state[2] = { false, false };
|
static bool _led_state[2] = { false, false };
|
||||||
|
|
||||||
__EXPORT void led_init()
|
__EXPORT void led_init(void)
|
||||||
{
|
{
|
||||||
PX4_DEBUG("LED_INIT");
|
PX4_DEBUG("LED_INIT");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ static void _sighandler(int sig_num)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void hrt_work_process()
|
static void hrt_work_process(void)
|
||||||
{
|
{
|
||||||
struct wqueue_s *wqueue = &g_hrt_work;
|
struct wqueue_s *wqueue = &g_hrt_work;
|
||||||
volatile struct work_s *work;
|
volatile struct work_s *work;
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ int work_usrthread(int argc, char *argv[])
|
|||||||
|
|
||||||
#endif /* CONFIG_SCHED_USRWORK */
|
#endif /* CONFIG_SCHED_USRWORK */
|
||||||
|
|
||||||
uint32_t clock_systimer()
|
uint32_t clock_systimer(void)
|
||||||
{
|
{
|
||||||
//printf("clock_systimer: %0lx\n", hrt_absolute_time());
|
//printf("clock_systimer: %0lx\n", hrt_absolute_time());
|
||||||
return (0x00000000ffffffff & hrt_absolute_time());
|
return (0x00000000ffffffff & hrt_absolute_time());
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ int hrt_work_queue(struct work_s *work, worker_t worker, void *arg, uint32_t usd
|
|||||||
void hrt_work_cancel(struct work_s *work);
|
void hrt_work_cancel(struct work_s *work);
|
||||||
|
|
||||||
static inline void hrt_work_lock(void);
|
static inline void hrt_work_lock(void);
|
||||||
static inline void hrt_work_lock()
|
static inline void hrt_work_lock(void)
|
||||||
{
|
{
|
||||||
px4_sem_wait(&_hrt_work_lock);
|
px4_sem_wait(&_hrt_work_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void hrt_work_unlock(void);
|
static inline void hrt_work_unlock(void);
|
||||||
static inline void hrt_work_unlock()
|
static inline void hrt_work_unlock(void)
|
||||||
{
|
{
|
||||||
px4_sem_post(&_hrt_work_lock);
|
px4_sem_post(&_hrt_work_lock);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,7 +359,6 @@ bool RCTest::sbus2Test()
|
|||||||
bool sbus_frame_drop;
|
bool sbus_frame_drop;
|
||||||
uint16_t max_channels = sizeof(rc_values) / sizeof(rc_values[0]);
|
uint16_t max_channels = sizeof(rc_values) / sizeof(rc_values[0]);
|
||||||
|
|
||||||
int rate_limiter = 0;
|
|
||||||
unsigned last_drop = 0;
|
unsigned last_drop = 0;
|
||||||
|
|
||||||
while (EOF != (ret = fscanf(fp, "%f,%x,,", &f, &x))) {
|
while (EOF != (ret = fscanf(fp, "%f,%x,,", &f, &x))) {
|
||||||
@@ -390,7 +389,6 @@ bool RCTest::sbus2Test()
|
|||||||
last_drop = sbus_frame_drops + sbus_frame_resets;
|
last_drop = sbus_frame_drops + sbus_frame_resets;
|
||||||
}
|
}
|
||||||
|
|
||||||
rate_limiter++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_test(ret == EOF);
|
ut_test(ret == EOF);
|
||||||
|
|||||||
Reference in New Issue
Block a user