Mode report workaround (#67)

* Add option for OI mode reporting bug workaround

https://github.com/AutonomyLab/create_robot/issues/64

* Update README.md

* Add note about 600 series OI mode reporting bug to Known Issues
  section and include details of API workaround option.
* Add myself to contributors list
This commit is contained in:
Josh Gadeken 2022-04-06 18:21:35 -06:00 committed by GitHub
parent db575de22a
commit e99939c785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 2 deletions

View file

@ -98,6 +98,10 @@ namespace create {
void onData();
bool updateLEDs();
// Flag to enable/disable the workaround for some 6xx incorrectly reporting OI mode
// https://github.com/AutonomyLab/create_robot/issues/64
bool modeReportWorkaround;
protected:
std::shared_ptr<create::Data> data;
std::shared_ptr<create::Serial> serial;
@ -673,6 +677,20 @@ namespace create {
* \return total number of serial packets.
*/
uint64_t getTotalPackets() const;
/**
* \brief Enable or disable the mode reporting workaround.
* Some Roomba 6xx robots incorrectly report the OI mode in their sensor streams. Enabling the workaround
* will cause libcreate to decrement the reported OI mode in the sensor stream by 1.
* See https://github.com/AutonomyLab/create_robot/issues/64
*/
void setModeReportWorkaround(const bool& enable);
/**
* \return true if the mode reporting workaround is enabled, false otherwise.
*/
bool getModeReportWorkaround() const;
}; // end Create class
} // namespace create