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.
Dependencies: C12832 MMA7660 mbed
Diff: main.cpp
- Revision:
- 11:28887549c7d5
- Parent:
- 10:9ca51c678bec
- Child:
- 12:1d5832974d41
--- a/main.cpp Wed Mar 28 11:10:15 2018 +0000
+++ b/main.cpp Wed Mar 28 13:43:08 2018 +0000
@@ -6,8 +6,7 @@
extern COMMAND_TRRIGER commandList[];
extern COMMAND_TRRIGER trrigerNull;
-BusIn joy(p15,p12,p13,p16);
-DigitalIn fire(p14);
+BusIn joyStick(p15,p12,p13,p16,p14);
C12832 lcd(p5, p7, p6, p8, p11);
int main()
@@ -23,9 +22,8 @@
COMMAND_TRRIGER *current = &trrigerNull;
while(true) {
COMMAND_TRRIGER *request = NULL;
- int trigger = fire ? 0xff : joy;
for(int index = 0; commandList[index].trigger != 0x00; index++) {
- if (trigger == commandList[index].trigger) {
+ if (joyStick == commandList[index].trigger) {
request = &commandList[index];
}
}