You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Public stuff
|
|
|
|
struct Client;
|
|
|
|
typedef struct Client* Client;
|
|
|
|
|
|
|
|
#include "message.h"
|
|
|
|
#include "chassis.h"
|
|
|
|
#include "sdk.h"
|
|
|
|
#include "gimbal.h"
|
|
|
|
#include "blaster.h"
|
|
|
|
#include "camera.h"
|
|
|
|
|
|
|
|
Client client_new();
|
|
|
|
void client_connect(Client client);
|
|
|
|
void poll_message(Client client, union Message* message);
|
|
|
|
|
|
|
|
static inline uint8_t host2byte(uint8_t host, uint8_t index) {
|
|
|
|
return index * 32 + host;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void byte2host(uint8_t b, uint8_t* host, uint8_t* index) {
|
|
|
|
*host = (b & 0x1F);
|
|
|
|
*index = b >> 5;
|
|
|
|
}
|
|
|
|
|