Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions code/headers/frame_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace r2d2 {
MAP_OBSTACLE,
END_EFFECTOR_TYPE,
END_EFFECTOR_CLAW,
GYROSCOPE,

// Don't touch
EXTERNAL,
Expand Down Expand Up @@ -633,6 +634,23 @@ namespace r2d2 {
uint8_t gas_id;
};

/*
* This frame will be send from the gyroscope module.
* It will if you want the gyroscope data or the acceleration data
* wiki page: https://github.com/R2D2-2019/R2D2-2019/wiki/Gyroscope
*/
R2D2_PACK_STRUCT
struct frame_gyroscope_s{
// bool to signal you want the gyroscope data
bool gyroscope;
// bool to signal you want the acceleration data
bool accel;
// the x, y and z variables that will be filled with the axis values from either gyroscope or the acceleration
int16_t x;
int16_t y;
int16_t z;
};

/*
* This is a frame that will be send to the sound module.
* It contains a simple rtttl string
Expand Down