84 } __attribute__((packed));
105 #define NAVDATA_PACKET_SIZE 60
106 #define NAVDATA_START_BYTE 0x3A
107 #define NAVDATA_CMD_START 0x01
108 #define NAVDATA_CMD_STOP 0x02
109 #define NAVDATA_CMD_BARO_CALIB 0x17
111 #define ARDRONE_GPIO_PORT 0x32524
112 #define ARDRONE_GPIO_PIN_NAVDATA 177
struct bmp180_calib_t bmp180_calib
BMP180 calibration receieved from navboard.
uint16_t temperature_gyro
ssize_t full_write(int fd, const uint8_t *buf, size_t count)
Write to fd even while being interrupted.
struct navdata_measure_t measure
Main navdata packet receieved from navboard.
bool imu_lost
Whenever the imu is lost.
int16_t navdata_height(void)
bool baro_calibrated
Whenever the baro is calibrated.
bool navdata_init(void)
Initialize the navdata board.
int fd
The navdata file pointer.
bool baro_available
Whenever the baro is available.
uint16_t us_distance_echo
void navdata_update(void)
Update the navdata (event loop)
uint16_t last_packet_number
ssize_t full_read(int fd, uint8_t *buf, size_t count)
Read from fd even while being interrupted.
bool is_initialized
Check if the navdata board is initialized.
uint16_t us_association_echo
uint16_t temperature_pressure
Main navdata structure from the navdata board This is received from the navdata board at ~200Hz.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.