Skip to content

Commit

Permalink
Minor formatting/comment edits
Browse files Browse the repository at this point in the history
  • Loading branch information
dekutree64 committed Jan 14, 2024
1 parent 241e8c0 commit aeb9238
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/sensors/LinearHall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// This function can be overridden with custom ADC code on platforms with poor analogRead performance.
__attribute__((weak)) void ReadLinearHalls(int hallA, int hallB, int *a, int *b)
{
*a = analogRead(hallA);
*b = analogRead(hallB);
*a = analogRead(hallA);
*b = analogRead(hallB);
}

LinearHall::LinearHall(int _hallA, int _hallB, int _pp){
Expand Down Expand Up @@ -71,6 +71,7 @@ void LinearHall::init(FOCMotor *motor) {
return;
}

// See comment in other version of init for why these are commented out
//pinMode(pinA, INPUT);
//pinMode(pinB, INPUT);

Expand Down
4 changes: 2 additions & 2 deletions src/sensors/LinearHall.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <SimpleFOC.h>

class FOCMotor;
// This function can be overridden with custom ADC code on platforms with poor analogRead performance.
void ReadLinearHalls(int hallA, int hallB, int *a, int *b);

/**
Expand All @@ -21,7 +21,7 @@ class LinearHall: public Sensor{
LinearHall(int hallA, int hallB, int pp);

void init(int centerA, int centerB); // Initialize without moving motor
void init(FOCMotor *motor); // Move motor to find center values
void init(class FOCMotor *motor); // Move motor to find center values

// Get current shaft angle from the sensor hardware, and
// return it as a float in radians, in the range 0 to 2PI.
Expand Down

0 comments on commit aeb9238

Please sign in to comment.