Updated namespace
This commit is contained in:
parent
f6f47d99ab
commit
ca35a59eb6
@ -3,11 +3,9 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
namespace RoboidControl {
|
namespace RoboidControl {
|
||||||
|
namespace Arduino {
|
||||||
|
|
||||||
DRV8833Motor::DRV8833Motor(Participant* participant,
|
DRV8833Motor::DRV8833Motor(Participant* participant, unsigned char pinIn1, unsigned char pinIn2, bool reverse)
|
||||||
unsigned char pinIn1,
|
|
||||||
unsigned char pinIn2,
|
|
||||||
bool reverse)
|
|
||||||
: Thing(participant) {
|
: Thing(participant) {
|
||||||
this->pinIn1 = pinIn1;
|
this->pinIn1 = pinIn1;
|
||||||
this->pinIn2 = pinIn2;
|
this->pinIn2 = pinIn2;
|
||||||
@ -47,7 +45,7 @@ void DRV8833Motor::SetAngularVelocity(Spherical velocity) {
|
|||||||
if (velocity.direction.horizontal.InDegrees() < 0)
|
if (velocity.direction.horizontal.InDegrees() < 0)
|
||||||
motorSpeed = -motorSpeed;
|
motorSpeed = -motorSpeed;
|
||||||
if (this->reverse)
|
if (this->reverse)
|
||||||
motorSpeed =-motorSpeed;
|
motorSpeed = -motorSpeed;
|
||||||
|
|
||||||
// std::cout << "ang speed " << this->name << " = " << angularSpeed << " rpm " << rpm
|
// std::cout << "ang speed " << this->name << " = " << angularSpeed << " rpm " << rpm
|
||||||
// << ", motor signal = " << (int)motorSignal << "\n";
|
// << ", motor signal = " << (int)motorSignal << "\n";
|
||||||
@ -118,4 +116,5 @@ DRV8833::DRV8833(Participant* participant,
|
|||||||
this->motorB->name = "Motor B";
|
this->motorB->name = "Motor B";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Arduino
|
||||||
} // namespace RoboidControl
|
} // namespace RoboidControl
|
Loading…
x
Reference in New Issue
Block a user