mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 04:46:51 +08:00
more vi_overo_link
This commit is contained in:
@@ -5,11 +5,17 @@
|
||||
<file name="vi_overo_link.h"/>
|
||||
</header>
|
||||
<init fun="vi_init()"/>
|
||||
<periodic fun="vi_periodic()" freq="25"/>
|
||||
<periodic fun="vi_periodic()" freq="512"/>
|
||||
<event fun="ViOveroLinkEvent()"/>
|
||||
<makefile>
|
||||
<file name="vi.c"/>
|
||||
<file name="vi_overo_link.c"/>
|
||||
<!-- <file name="lisa/lisa_overo_link.c"/> -->
|
||||
<raw>ap.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c</raw>
|
||||
<raw>ap.CFLAGS += -DUSE_OVERO_LINK</raw>
|
||||
<raw>ap.CFLAGS += -Ilisa/arch/stm32</raw>
|
||||
<raw>ap.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageFoo</raw>
|
||||
<raw>ap.CFLAGS += -DOVERO_LINK_MSG_DOWN=AutopilotMessageFoo</raw>
|
||||
<raw>ap.CFLAGS += -DOVERO_LINK_LED_OK=3 -DOVERO_LINK_LED_KO=2 -DUSE_DMA1_C2_IRQ</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -23,15 +23,37 @@
|
||||
|
||||
#include "modules/vehicle_interface/vi_overo_link.h"
|
||||
|
||||
void vi_impl_init(void) {
|
||||
#include "lisa/lisa_overo_link.h"
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
static inline void on_overo_link_lost(void);
|
||||
|
||||
void vi_impl_init(void) {
|
||||
overo_link_init();
|
||||
}
|
||||
|
||||
void vi_impl_periodic(void) {
|
||||
|
||||
OveroLinkPeriodic(on_overo_link_lost);
|
||||
}
|
||||
|
||||
void vi_impl_set_enabled(bool_t enabled __attribute__ ((unused))) {
|
||||
|
||||
}
|
||||
|
||||
static inline void on_overo_link_lost(void) {
|
||||
|
||||
}
|
||||
|
||||
void vi_overo_link_on_msg_received(void) {
|
||||
|
||||
memcpy(&overo_link.up.msg, &overo_link.down.msg,
|
||||
sizeof(union AutopilotMessage));
|
||||
|
||||
}
|
||||
|
||||
|
||||
void vi_overo_link_on_crc_err(void) {
|
||||
|
||||
}
|
||||
|
||||
@@ -27,9 +27,13 @@
|
||||
#include "std.h"
|
||||
#include "modules/vehicle_interface/vi.h"
|
||||
#include "math/pprz_algebra_int.h"
|
||||
#include "lisa/lisa_overo_link.h"
|
||||
|
||||
#define ViOveroLinkEvent() { \
|
||||
OveroLinkEvent(vi_overo_link_on_msg_received, vi_overo_link_on_crc_err); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern void vi_overo_link_on_msg_received(void);
|
||||
extern void vi_overo_link_on_crc_err(void);
|
||||
|
||||
#endif /* VEHICLE_INTERFACE_OVERO_LINK_H */
|
||||
|
||||
Reference in New Issue
Block a user