Skip to content

Commit

Permalink
Fixing compilation and motor allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Mar 30, 2021
1 parent b821c8d commit cadb9d6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion examples/FullSystemTest/FullSystemTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ void setup()
{
// This will initialize the Serial as 115200 for prints
Serial.begin(115200);
ESP32PWM::allocateTimer(1); // Used by servos
// pin definitions https://wpiroboticsengineering.github.io/RBE1001Lib/RBE1001Lib_8h.html#define-members
rangefinder1.attach(SIDE_ULTRASONIC_TRIG, SIDE_ULTRASONIC_ECHO);
lifter.attach(SERVO_PIN);
Expand Down
2 changes: 0 additions & 2 deletions examples/Servo/Servo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ ESP32AnalogRead servoPositionFeedback;
void setup()
{
Serial.begin(115200);
ESP32PWM::allocateTimer(1); // Used by servos

// pin definitions https://wpiroboticsengineering.github.io/RBE1001Lib/RBE1001Lib_8h.html#define-members
lifter.attach(SERVO_PIN);
servoPositionFeedback.attach(SERVO_FEEDBACK_SENSOR);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=RBE1001Lib
version=0.11.4
version=0.12.0
author=Kevin Harrington
maintainer=Kevin Harrington <[email protected]>
sentence=Support robotics education with simplified support classes.
Expand Down
9 changes: 5 additions & 4 deletions src/Motor.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ class Motor
* @note this should only be called from the PID thread
*/
void setEffortLocal(float effort);
/**
* @param PWMgenerationTimer the timer to be used to generate the 20khz PWM
*/
static void allocateTimer(int PWMgenerationTimer);
/**
* this is a flag to switch between using the PID controller, or allowing the user to set effort 'directly'
*
Expand Down Expand Up @@ -195,10 +199,7 @@ class Motor
*/
static Motor *list[MAX_POSSIBLE_MOTORS];

/**
* @param PWMgenerationTimer the timer to be used to generate the 20khz PWM
*/
static void allocateTimer(int PWMgenerationTimer);


/** \brief A PID Motor class using FreeRTOS threads, ESP32Encoder and ESP32PWM
*
Expand Down

0 comments on commit cadb9d6

Please sign in to comment.