Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Input/Switch/Switch.cpp
- Revision:
- 10:a81546661fb5
- Parent:
- 9:49e851ad441e
--- a/Input/Switch/Switch.cpp Sat Feb 23 02:47:39 2019 +0000
+++ b/Input/Switch/Switch.cpp Sat Feb 23 05:34:18 2019 +0000
@@ -2,9 +2,9 @@
#include <stdint.h>
DigitalIn limitSw[] = {
- //DigitalIn(LIMITSW0_PIN),
- //DigitalIn(LIMITSW1_PIN),
- //DigitalIn(LIMITSW2_PIN),
+ DigitalIn(LIMITSW0_PIN),
+ DigitalIn(LIMITSW1_PIN),
+ DigitalIn(LIMITSW2_PIN),
DigitalIn(LIMITSW3_PIN),
};
@@ -15,6 +15,6 @@
}
bool Switch::checkPushed(int mySwitch) {
- return mySwitch ? false : true;
+ return limitSw[mySwitch] ? false : true;
}
}