16 #ifndef __PIXYINTERPRETER_HPP__
17 #define __PIXYINTERPRETER_HPP__
20 #include "pixytypes.h"
24 #include "interpreter.hpp"
25 #include "chirpreceiver.hpp"
27 #define PIXY_BLOCK_CAPACITY 250
104 std::vector<Block> blocks_;
105 bool blocks_are_new_;
114 void interpret_data(
const void * chrip_data[]);
121 void interpret_CCB1(
const void * data[]);
128 void interpret_CCB2(
const void * data[]);
137 void add_normal_blocks(
const BlobA * blocks, uint32_t count);
146 void add_color_code_blocks(
const BlobB * blocks, uint32_t count);
int send_command(const char *name, va_list arguments)
Sends a command to Pixy.
Definition: pixyinterpreter.cpp:100
int get_blocks(int max_blocks, Block *blocks)
Copies up to 'max_blocks' number of Blocks to the address pointed to by 'blocks'. ...
Definition: pixyinterpreter.cpp:64
void close()
Terminates the USB connection to Pixy and the 'iterpreter' thread.
Definition: pixyinterpreter.cpp:54
Definition: pixytypes.h:133
Definition: chirpreceiver.hpp:23
Definition: pixytypes.h:156
int init()
Spawns an 'interpreter' thread which attempts to connect to Pixy using the USB interface. On successful connection, this thread will capture and store Pixy 'block' object data which can be retreived using the getBlocks() method.
Definition: pixyinterpreter.cpp:31
Definition: pixyinterpreter.hpp:29
Definition: interpreter.hpp:19
int blocks_are_new()
Get status of the block data received from Pixy.
Definition: pixyinterpreter.cpp:289