Skip to content

Commit 12cc1c6

Browse files
author
jenkie
committed
Bugfix Sempu BB
1 parent faa630d commit 12cc1c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Arduino_Pedelec_Controller/Arduino_Pedelec_Controller.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const int torquevalues_count=16;
283283
volatile int torquevalues[torquevalues_count]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //stores the 16 torque values per pedal roundtrip (Thun) or half roundtrip (Sempu)
284284
#elif defined(SUPPORT_SEMPU)
285285
const int torquevalues_count=24;
286-
volatile int torquevalues[torquevalues_count]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //stores the 24 torque values per pedal half roundtrip (Sempu new version)
286+
volatile int torquevalues[torquevalues_count]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //stores the 24 torque values per pedal roundtrip (Sempu new version)
287287
#endif
288288
volatile byte torqueindex=0; //index to write next torque value
289289
volatile boolean readtorque=false; //true if torque array has been updated -> recalculate in main loop
@@ -1101,10 +1101,8 @@ void pas_change_dual(boolean signal)
11011101
pedaling=!bitRead(PINE,6);
11021102
#ifdef SUPPORT_XCELL_RT
11031103
cad=7500/(millis()-last_pas_event); //8 pulses per revolution
1104-
#elif defined(SUPPORT_BBS)
1104+
#else //Sempu or BBS with 24 Pulses per Revolution
11051105
cad=2500/(millis()-last_pas_event); //24 pulses per revolution
1106-
#else //Sempu: 48 pulses per revolution
1107-
cad=1250/(millis()-last_pas_event); //48 pulses per revolution
11081106
#endif
11091107
last_pas_event = millis();
11101108
}

0 commit comments

Comments
 (0)