mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 14:33:34 +08:00
QuRT: stub out missing functions
Stub out the missing functions to enable running in the simulator Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include <px4_defines.h>
|
||||
#include <px4_middleware.h>
|
||||
#include <px4_workqueue.h>
|
||||
#include <dataman/dataman.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
@@ -52,6 +53,9 @@ __BEGIN_DECLS
|
||||
// FIXME - sysconf(_SC_CLK_TCK) not supported
|
||||
long PX4_TICKS_PER_SEC = 1000;
|
||||
|
||||
void usleep(useconds_t usec) {}
|
||||
unsigned int sleep(unsigned int sec) { return 0; }
|
||||
|
||||
__END_DECLS
|
||||
|
||||
extern struct wqueue_s gwork[NWORKERS];
|
||||
@@ -83,3 +87,36 @@ void init(int argc, char *argv[], const char *app_name)
|
||||
|
||||
}
|
||||
|
||||
/** Retrieve from the data manager store */
|
||||
ssize_t
|
||||
dm_read(
|
||||
dm_item_t item, /* The item type to retrieve */
|
||||
unsigned char index, /* The index of the item */
|
||||
void *buffer, /* Pointer to caller data buffer */
|
||||
size_t buflen /* Length in bytes of data to retrieve */
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** write to the data manager store */
|
||||
ssize_t
|
||||
dm_write(
|
||||
dm_item_t item, /* The item type to store */
|
||||
unsigned char index, /* The index of the item */
|
||||
dm_persitence_t persistence, /* The persistence level of this item */
|
||||
const void *buffer, /* Pointer to caller data buffer */
|
||||
size_t buflen /* Length in bytes of data to retrieve */
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t strnlen(const char *s, size_t maxlen)
|
||||
{
|
||||
size_t i=0;
|
||||
while (s[i] != '\0' && i < maxlen)
|
||||
++i;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user