Skip to content

Commit aeb9238

Browse files
committed
Minor formatting/comment edits
1 parent 241e8c0 commit aeb9238

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/sensors/LinearHall.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// This function can be overridden with custom ADC code on platforms with poor analogRead performance.
44
__attribute__((weak)) void ReadLinearHalls(int hallA, int hallB, int *a, int *b)
55
{
6-
*a = analogRead(hallA);
7-
*b = analogRead(hallB);
6+
*a = analogRead(hallA);
7+
*b = analogRead(hallB);
88
}
99

1010
LinearHall::LinearHall(int _hallA, int _hallB, int _pp){
@@ -71,6 +71,7 @@ void LinearHall::init(FOCMotor *motor) {
7171
return;
7272
}
7373

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

src/sensors/LinearHall.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <SimpleFOC.h>
55

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

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

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

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

0 commit comments

Comments
 (0)