Add support for first generation Create (Roomba 400 series)
This commit is contained in:
parent
ee4c06a404
commit
f073458624
7 changed files with 348 additions and 132 deletions
|
@ -51,6 +51,8 @@ namespace create {
|
|||
LED_CHECK = 8
|
||||
};
|
||||
|
||||
RobotModel model;
|
||||
|
||||
uint8_t mainMotorPower;
|
||||
uint8_t sideMotorPower;
|
||||
uint8_t vacuumMotorPower;
|
||||
|
@ -85,11 +87,11 @@ namespace create {
|
|||
/* Default constructor.
|
||||
* Does not attempt to establish serial connection to Create.
|
||||
*/
|
||||
Create();
|
||||
Create(RobotModel = CREATE_2);
|
||||
|
||||
/* Attempts to establish serial connection to Create.
|
||||
*/
|
||||
Create(const std::string& port, const int& baud);
|
||||
Create(const std::string& port, const int& baud, RobotModel = CREATE_2);
|
||||
|
||||
~Create();
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace create {
|
|||
std::vector<uint8_t> ids;
|
||||
|
||||
public:
|
||||
Data();
|
||||
Data(RobotModel = CREATE_2);
|
||||
~Data();
|
||||
|
||||
bool isValidPacketID(const uint8_t id) const;
|
||||
|
|
|
@ -33,6 +33,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define CREATE_TYPES_H
|
||||
|
||||
namespace create {
|
||||
enum RobotModel {
|
||||
CREATE_1 = 0, // Roomba 400 series
|
||||
CREATE_2 // Roomba 600 series
|
||||
};
|
||||
|
||||
enum SensorPacketID {
|
||||
ID_GROUP_0 = 0,
|
||||
ID_GROUP_1 = 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue