Skip to content

Commit b46582f

Browse files
committed
Remove unused electric sector array
1 parent 5160698 commit b46582f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/sensors/HallSensor.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
#include "./communication/SimpleFOCDebug.h"
33

44
// seq 1 > 5 > 4 > 6 > 2 > 3 > 1 000 001 010 011 100 101 110 111
5-
const int8_t ELECTRIC_SECTORS_120[8] = { -1, 0, 4, 5, 2, 1, 3 , -1 };
6-
7-
// seq 1 > 5 > 4 > 6 > 2 > 3 > 1 000 001 010 011 100 101 110 111
8-
const int8_t ELECTRIC_SECTORS_60[8] = { 0, 5, 1, 2, 5, 4, 2 , 3 };
5+
const int8_t ELECTRIC_SECTORS[8] = { -1, 0, 4, 5, 2, 1, 3 , -1 };
96

107
/*
118
HallSensor(int hallA, int hallB , int cpr, int index)
@@ -99,7 +96,7 @@ void HallSensor::updateState() {
9996

10097

10198
int8_t new_electric_sector;
102-
new_electric_sector = ELECTRIC_SECTORS_120[new_hall_state];
99+
new_electric_sector = ELECTRIC_SECTORS[new_hall_state];
103100
int8_t electric_sector_dif = new_electric_sector - electric_sector;
104101
if (electric_sector_dif > 3) {
105102
//underflow

0 commit comments

Comments
 (0)