File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 77
88#include " Q_Timer.h"
99
10- Timer::Timer (int length) {
10+ Timer::Timer (unsigned long length) {
1111 this ->running = false ;
1212 this ->ringing = false ;
1313 this ->ringing_counter = 0 ;
@@ -43,16 +43,16 @@ void Timer::start(unsigned long start_time) {
4343 this ->running = true ;
4444}
4545
46- void Timer::enable (int case ) {
47- switch {
46+ void Timer::enable (int feature ) {
47+ switch (feature) {
4848 case COMPENSATE_OVERFLOW:
4949 this ->compensate_overflow = true ;
5050 break ;
5151 }
5252}
5353
54- void Timer::disable () {
55- switch {
54+ void Timer::disable (int feature ) {
55+ switch (feature) {
5656 case COMPENSATE_OVERFLOW:
5757 this ->compensate_overflow = false ;
5858 break ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class Timer {
3131 * param start_time: Sets a starting point in the past or future in ms from
3232 * the start of the microcontroller. 0 will default to current millis()
3333 */
34- void start (unsigned long start_time = 0 );
34+ void start (unsigned long start_time);
3535
3636 /* Enables optional features. Should be called before starting the timer to
3737 * avoid unexpected behaviour.
@@ -80,7 +80,7 @@ class Timer {
8080
8181 bool compensate_overflow;
8282 unsigned long interval_time; // Timer rings every <interval_timer> ms
83- unsigned long last_start ; // this & interval_time result in the next ring
83+ unsigned long starting_point ; // this & interval_time result in the next ring
8484 unsigned long elapsed;
8585};
8686
You can’t perform that action at this time.
0 commit comments