![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Diff: MAVlink/include/mavlink_bridge.h
- Revision:
- 0:a6a169de725f
diff -r 000000000000 -r a6a169de725f MAVlink/include/mavlink_bridge.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MAVlink/include/mavlink_bridge.h Mon May 27 13:26:03 2013 +0000 @@ -0,0 +1,41 @@ +/* MAVLink adapter header */ +#ifndef __MAVLINK_BRIDGE_HEADER_H +#define __MAVLINK_BRIDGE_HEADER_H + +#define MAVLINK_USE_CONVENIENCE_FUNCTIONS + +#include "mavlink_types.h" + +/* Struct that stores the communication settings of this system. + you can also define / alter these settings elsewhere, as long + as they're included BEFORE mavlink.h. + So you can set the + + mavlink_system.sysid = 100; // System ID, 1-255 + mavlink_system.compid = 50; // Component/Subsystem ID, 1-255 + + Lines also in your main.c, e.g. by reading these parameter from EEPROM. + */ +mavlink_system_t mavlink_system; + +/** + * @brief Send one char (uint8_t) over a comm channel + * + * @param chan MAVLink channel to use, usually MAVLINK_COMM_0 = UART0 + * @param ch Character to send + */ +static inline void comm_send_ch(mavlink_channel_t chan, uint8_t ch) { + extern Serial pc; + + if (chan == MAVLINK_COMM_0) { + pc.putc(ch); + } + if (chan == MAVLINK_COMM_1) { + // write to mavlink logfile + } +} + +#include "protocol.h" +#include "common/common.h" + +#endif /* YOUR_MAVLINK_BRIDGE_HEADER_H *//* MAVLink adapter header */ \ No newline at end of file