Skip to content

Commit ef7cf73

Browse files
committed
unfortunately, the string "EXTERN" is defined in rp2040 headers
I renamed the enum member EXTERN to EXTERNAL. For consistency, I also renmaed INTERN.
1 parent 5a9f092 commit ef7cf73

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/common/base_classes/Sensor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ enum Direction{
1515
* Pullup configuration structure
1616
*/
1717
enum Pullup{
18-
INTERN, //!< Use internal pullups
19-
EXTERN //!< Use external pullups
18+
INTERNAL, //!< Use internal pullups
19+
EXTERNAL //!< Use external pullups
2020
};
2121

2222
/**
@@ -43,4 +43,4 @@ class Sensor{
4343
long velocity_calc_timestamp=0; //!< last velocity calculation timestamp
4444
};
4545

46-
#endif
46+
#endif

src/sensors/Encoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Encoder::Encoder(int _encA, int _encB , float _ppr, int _index){
3232
prev_timestamp_us = _micros();
3333

3434
// extern pullup as default
35-
pullup = Pullup::EXTERN;
35+
pullup = Pullup::EXTERNAL;
3636
// enable quadrature encoder by default
3737
quadrature = Quadrature::ON;
3838
}
@@ -160,7 +160,7 @@ int Encoder::hasIndex(){
160160
void Encoder::init(){
161161

162162
// Encoder - check if pullup needed for your encoder
163-
if(pullup == Pullup::INTERN){
163+
if(pullup == Pullup::INTERNAL){
164164
pinMode(pinA, INPUT_PULLUP);
165165
pinMode(pinB, INPUT_PULLUP);
166166
if(hasIndex()) pinMode(index_pin,INPUT_PULLUP);

src/sensors/HallSensor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ HallSensor::HallSensor(int _hallA, int _hallB, int _hallC, int _pp){
1717
cpr = _pp * 6;
1818

1919
// extern pullup as default
20-
pullup = Pullup::EXTERN;
20+
pullup = Pullup::EXTERNAL;
2121
}
2222

2323
// HallSensor interrupt callback functions
@@ -119,7 +119,7 @@ void HallSensor::init(){
119119
electric_rotations = 0;
120120

121121
// HallSensor - check if pullup needed for your HallSensor
122-
if(pullup == Pullup::INTERN){
122+
if(pullup == Pullup::INTERNAL){
123123
pinMode(pinA, INPUT_PULLUP);
124124
pinMode(pinB, INPUT_PULLUP);
125125
pinMode(pinC, INPUT_PULLUP);

src/sensors/MagneticSensorAnalog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MagneticSensorAnalog::MagneticSensorAnalog(uint8_t _pinAnalog, int _min_raw_coun
1313
min_raw_count = _min_raw_count;
1414
max_raw_count = _max_raw_count;
1515

16-
if(pullup == Pullup::INTERN){
16+
if(pullup == Pullup::INTERNAL){
1717
pinMode(pinAnalog, INPUT_PULLUP);
1818
}else{
1919
pinMode(pinAnalog, INPUT);

0 commit comments

Comments
 (0)