tomfclarke / adafruit-motor-hat-cpp-library

C++ Port of the Adafruit Motor HAT Python Library
MIT License
8 stars 3 forks source link

Missing case "kbrake" in adafruitdcmotor.cpp #3

Closed jonste99 closed 3 years ago

jonste99 commented 4 years ago

In the header-file you defined a command enum in which you define the command "kbrake", but the case to run this command is missing in the following switch statement. switch (command) { case kForward: setPin (in1Pin, true); setPin (in2Pin, false); break; case kBackward: setPin (in1Pin, false); setPin (in2Pin, true); break; //Here needs to be the case for kbrake case kRelease: setPin (in1Pin, false); setPin (in2Pin, false); break; default: break; }

tomfclarke commented 3 years ago

Sorry for the delayed response! Thanks for pointing this out. I'll take a look today.