Skip to content

Commit 6efe0a4

Browse files
author
Felix Queisler
committed
Fixed compile errors
1 parent dc20ca2 commit 6efe0a4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Q_Timer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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;

src/Q_Timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)