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.
robomaster-sdk/include/robomaster.h

30 lines
561 B
C

#pragma once
// Public stuff
struct Client;
typedef struct Client* Client;
#include "message.h"
#include "chassis.h"
#include "sdk.h"
// SIMPLE
// Create a client
// Connect to a drone
// Send messages
// Poll for responses
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;
}