Skip to content

Commit 80bd731

Browse files
committed
fixes bug introduced in commit 650968e
1 parent 2f85933 commit 80bd731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Modulino.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Module : public Printable {
108108
public:
109109
Module(uint8_t address = 0xFF, const char* name = "", ModulinoHubPort* hubPort = nullptr)
110110
: address(address), name((char *)name), hubPort(hubPort) {}
111-
virtual ~Module() {}
111+
virtual ~Module() {}
112112
bool begin() {
113113
if (address >= 0x7F) {
114114
address = discover() / 2; // divide by 2 to match address in fw main.c
@@ -267,7 +267,7 @@ class ModulinoJoystick : public Module {
267267
auto x = buf[0];
268268
auto y = buf[1];
269269
map_value(x, y);
270-
auto ret = res && (x != last_status[0] || buf[1] != y || buf[2] != last_status[2]);
270+
auto ret = res && (x != last_status[0] || y != last_status[1] || buf[2] != last_status[2]);
271271
if (!ret) {
272272
return false;
273273
}
@@ -841,7 +841,7 @@ class ModulinoDistance : public Module {
841841
if (api == nullptr) {
842842
return false;
843843
}
844-
844+
845845
uint8_t NewDataReady = 0;
846846
api->checkForDataReady(&NewDataReady);
847847
if (NewDataReady) {

0 commit comments

Comments
 (0)