Skip to content

Commit 519bac0

Browse files
committed
Bug fixed.
1 parent fcd3e42 commit 519bac0

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/Utils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "Utils.h"
2-
#include "Arduino.h"
32

43
bool pulseTriggered(int pin) { return digitalRead(pin) == LOW; }
54

src/Utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#define UTILS_H
33

44

5+
#include "Arduino.h"
6+
57
bool pulseTriggered(int pin);
68

79
bool equivalent(long a, long b, float epsilon);

src/VoltageSensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ VoltageSensor::VoltageSensor(int *const pins) : Device<float>(pins) {}
44

55
void VoltageSensor::initialize() { pinMode(_pins[0], INPUT); }
66

7-
float VoltageSensor::read() { return ((float) analogRead(_pins[0]) / 4.092) % 100 / 10; }
7+
float VoltageSensor::read() { return int(((float) analogRead(_pins[0]) / 4.092)) % 100 / 10; }

src/VoltageSensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class VoltageSensor : public Device<float> {
88
public:
9-
WheelSpeedSensor(int *const pins);
9+
VoltageSensor(int *const pins);
1010
void initialize();
1111
float read();
1212
};

0 commit comments

Comments
 (0)