mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 05:10:34 +08:00
Build fixes for qurt after rebase on PX4 master
Removed the re-definitions of the usage method in the posix/main.cpp file. Added qurt_external_hook interface to call externally linked module. Fixed code format to comply with PX4 style. Added usage information to main app and handled cases for unknown arguments. Fixed the orb_priority interface to use int32_t instead of int. Fixes to get hil working with led changes. Added the config_eagle_adsp.mk file and update the make files to to use new include/lib paths Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include <string>
|
||||
#include <pthread.h>
|
||||
#include "uORB/uORBCommunicator.hpp"
|
||||
#include <px4_muorb/px4muorb_KraitRpcWrapper.hpp>
|
||||
#include <px4muorb_KraitRpcWrapper.hpp>
|
||||
#include <map>
|
||||
#include "drivers/drv_hrt.h"
|
||||
|
||||
|
||||
@@ -141,10 +141,6 @@ static void usage()
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern int simulator_main(int argc, char *argv[]);
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
extern void led_toggle(int led);
|
||||
__END_DECLS
|
||||
|
||||
extern "C" {
|
||||
@@ -198,39 +194,3 @@ int simulator_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool static _led_state[2] = { false , false };
|
||||
|
||||
__EXPORT void led_init()
|
||||
{
|
||||
PX4_DEBUG("LED_INIT");
|
||||
}
|
||||
|
||||
__EXPORT void led_on(int led)
|
||||
{
|
||||
if (led == 1 || led == 0)
|
||||
{
|
||||
PX4_DEBUG("LED%d_ON", led);
|
||||
_led_state[led] = true;
|
||||
}
|
||||
}
|
||||
|
||||
__EXPORT void led_off(int led)
|
||||
{
|
||||
if (led == 1 || led == 0)
|
||||
{
|
||||
PX4_DEBUG("LED%d_OFF", led);
|
||||
_led_state[led] = false;
|
||||
}
|
||||
}
|
||||
|
||||
__EXPORT void led_toggle(int led)
|
||||
{
|
||||
if (led == 1 || led == 0)
|
||||
{
|
||||
_led_state[led] = !_led_state[led];
|
||||
PX4_DEBUG("LED%d_TOGGLE: %s", led, _led_state[led] ? "ON" : "OFF");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ int orb_group_count(const struct orb_metadata *meta)
|
||||
* priority, independent of the startup order of the associated publishers.
|
||||
* @return OK on success, ERROR otherwise with errno set accordingly.
|
||||
*/
|
||||
int orb_priority(int handle, int *priority)
|
||||
int orb_priority(int handle, int32_t *priority)
|
||||
{
|
||||
return uORB::Manager::get_instance()->orb_priority(handle, priority);
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ public:
|
||||
* priority, independent of the startup order of the associated publishers.
|
||||
* @return OK on success, ERROR otherwise with errno set accordingly.
|
||||
*/
|
||||
int orb_priority(int handle, int *priority) ;
|
||||
int orb_priority(int handle, int32_t *priority) ;
|
||||
|
||||
/**
|
||||
* Set the minimum interval between which updates are seen for a subscription.
|
||||
|
||||
@@ -166,7 +166,7 @@ int uORB::Manager::orb_stat(int handle, uint64_t *time)
|
||||
return ioctl(handle, ORBIOCLASTUPDATE, (unsigned long)(uintptr_t)time);
|
||||
}
|
||||
|
||||
int uORB::Manager::orb_priority(int handle, int *priority)
|
||||
int uORB::Manager::orb_priority(int handle, int32_t *priority)
|
||||
{
|
||||
return ioctl(handle, ORBIOCGPRIORITY, (unsigned long)(uintptr_t)priority);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ int uORB::Manager::orb_stat(int handle, uint64_t *time)
|
||||
return px4_ioctl(handle, ORBIOCLASTUPDATE, (unsigned long)(uintptr_t)time);
|
||||
}
|
||||
|
||||
int uORB::Manager::orb_priority(int handle, int *priority)
|
||||
int uORB::Manager::orb_priority(int handle, int32_t *priority)
|
||||
{
|
||||
return px4_ioctl(handle, ORBIOCGPRIORITY, (unsigned long)(uintptr_t)priority);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user