23 #ifndef __PLUGINS_ROOMBA_ROOMBA_500_H_
24 #define __PLUGINS_ROOMBA_ROOMBA_500_H_
26 #include <core/plugin.h>
301 static const unsigned short int SENSPACK_SIZE_GROUP_0;
302 static const unsigned short int SENSPACK_SIZE_GROUP_1;
303 static const unsigned short int SENSPACK_SIZE_GROUP_2;
304 static const unsigned short int SENSPACK_SIZE_GROUP_3;
305 static const unsigned short int SENSPACK_SIZE_GROUP_4;
306 static const unsigned short int SENSPACK_SIZE_GROUP_5;
307 static const unsigned short int SENSPACK_SIZE_GROUP_6;
308 static const unsigned short int SENSPACK_SIZE_GROUP_ALL;
309 static const unsigned short int SENSPACK_SIZE_GROUP_101;
310 static const unsigned short int SENSPACK_SIZE_GROUP_106;
311 static const unsigned short int SENSPACK_SIZE_GROUP_107;
312 static const unsigned short int SENSPACK_SIZE_BUMPS_DROPS;
313 static const unsigned short int SENSPACK_SIZE_WALL;
314 static const unsigned short int SENSPACK_SIZE_CLIFF_LEFT;
315 static const unsigned short int SENSPACK_SIZE_CLIFF_FRONT_LEFT;
316 static const unsigned short int SENSPACK_SIZE_CLIFF_FRONT_RIGHT;
317 static const unsigned short int SENSPACK_SIZE_CLIFF_RIGHT;
318 static const unsigned short int SENSPACK_SIZE_VIRTUAL_WALL;
319 static const unsigned short int SENSPACK_SIZE_WHEEL_OVERCURRENTS;
320 static const unsigned short int SENSPACK_SIZE_DIRT_DETECT;
321 static const unsigned short int SENSPACK_SIZE_IR_CHAR_OMNI;
322 static const unsigned short int SENSPACK_SIZE_IR_CHAR_LEFT;
323 static const unsigned short int SENSPACK_SIZE_IR_CHAR_RIGHT;
324 static const unsigned short int SENSPACK_SIZE_BUTTONS;
325 static const unsigned short int SENSPACK_SIZE_DISTANCE;
326 static const unsigned short int SENSPACK_SIZE_ANGLE;
327 static const unsigned short int SENSPACK_SIZE_CHARGING_STATE;
328 static const unsigned short int SENSPACK_SIZE_VOLTAGE;
329 static const unsigned short int SENSPACK_SIZE_CURRENT;
330 static const unsigned short int SENSPACK_SIZE_TEMPERATURE;
331 static const unsigned short int SENSPACK_SIZE_BATTERY_CHARGE;
332 static const unsigned short int SENSPACK_SIZE_BATTERY_CAPACITY;
333 static const unsigned short int SENSPACK_SIZE_WALL_SIGNAL;
334 static const unsigned short int SENSPACK_SIZE_CLIFF_LEFT_SIGNAL;
335 static const unsigned short int SENSPACK_SIZE_CLIFF_FRONT_LEFT_SIGNAL;
336 static const unsigned short int SENSPACK_SIZE_CLIFF_FRONT_RIGHT_SIGNAL;
337 static const unsigned short int SENSPACK_SIZE_CLIFF_RIGHT_SIGNAL;
338 static const unsigned short int SENSPACK_SIZE_CHARGE_SOURCES;
339 static const unsigned short int SENSPACK_SIZE_OI_MODE;
340 static const unsigned short int SENSPACK_SIZE_SONG_NUMBER;
341 static const unsigned short int SENSPACK_SIZE_SONG_PLAYING;
342 static const unsigned short int SENSPACK_SIZE_STREAM_PACKETS;
343 static const unsigned short int SENSPACK_SIZE_REQ_VELOCITY;
344 static const unsigned short int SENSPACK_SIZE_REQ_RADIUS;
345 static const unsigned short int SENSPACK_SIZE_REQ_RIGHT_VELOCITY;
346 static const unsigned short int SENSPACK_SIZE_REQ_LEFT_VELOCITY;
347 static const unsigned short int SENSPACK_SIZE_RIGHT_ENCODER;
348 static const unsigned short int SENSPACK_SIZE_LEFT_ENCODER;
349 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER;
350 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER_LEFT;
351 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER_FRONT_LEFT;
352 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER_CENTER_LEFT;
353 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER_CENTER_RIGHT;
354 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER_FRONT_RIGHT;
355 static const unsigned short int SENSPACK_SIZE_LIGHT_BUMPER_RIGHT;
356 static const unsigned short int SENSPACK_SIZE_LEFT_MOTOR_CURRENT;
357 static const unsigned short int SENSPACK_SIZE_RIGHT_MOTOR_CURRENT;
358 static const unsigned short int SENSPACK_SIZE_BRUSH_MOTOR_CURRENT;
359 static const unsigned short int SENSPACK_SIZE_SIDE_BRUSH_MOTOR_CURRENT;
360 static const unsigned short int SENSPACK_SIZE_STASIS;
472 void drive_arc(
short int velo_mm_per_sec,
short int radius_mm);
473 void drive(
short int velocity_mm_per_sec,
short int radius_mm);
474 void drive_direct(
short int left_mm_per_sec,
short int right_mm_per_sec);
475 void drive_pwm(
short int left_wheel_pwm,
short int right_wheel_pwm);
476 void set_motors(
bool main =
true,
bool side =
true,
bool vacuum =
true,
477 bool main_backward =
false,
bool side_backward =
false);
478 void set_leds(
bool debris,
bool spot,
bool dock,
bool check_robot,
479 unsigned char clean_color,
unsigned char clean_intensity);
492 {
return __sensor_packet_received; };
501 const void *params = NULL,
const size_t plength = 0);
502 void recv(
size_t index,
size_t num_bytes,
unsigned int timeout_ms = 0);
504 void assert_control()
510 void assert_connected()
515 unsigned int __conn_flags;
519 unsigned char __packet_reply_id;
520 unsigned short __packet_length;
521 bool __sensors_enabled;
522 SensorPacketGroupAll __sensor_packet;
523 bool __sensor_packet_received;
531 unsigned char __obuffer[16];
532 unsigned char __ibuffer[82];
534 int __obuffer_length;
535 int __ibuffer_length;