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: mbed RA8875 Keypad
Revision 3:954431ea9b0d, committed 2016-03-05
- Comitter:
- WiredHome
- Date:
- Sat Mar 05 16:50:26 2016 +0000
- Parent:
- 2:117fb9168afc
- Child:
- 4:8c1932fcd628
- Commit message:
- improve error messages in demo when touch calibration fails. Update for one keypad API that was unnecessary, and eliminated.
Changed in this revision
| Keypad.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Keypad.lib Sat Mar 05 16:23:10 2016 +0000 +++ b/Keypad.lib Sat Mar 05 16:50:26 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/WiredHome/code/Keypad/#6d05764dfde7 +https://developer.mbed.org/users/WiredHome/code/Keypad/#402f1126a3ec
--- a/main.cpp Sat Mar 05 16:23:10 2016 +0000
+++ b/main.cpp Sat Mar 05 16:50:26 2016 +0000
@@ -46,8 +46,12 @@
fwrite(&matrix, sizeof(tpMatrix_t), 1, fh);
fclose(fh);
} else {
+ lcd.printf("Cannot save calibration in /local/tpcal.cfg\r\n");
+ wait_ms(1000);
}
} else {
+ lcd.printf("TouchPanelCalibrate returned error code %d\r\n", r);
+ wait_ms(2000);
}
}
@@ -113,7 +117,8 @@
char name1[10];
// copy definition and then resize it
- memcpy(&tiny, kp.GetInternalKeypad(), sizeof(Keypad::keyboard_t));
+ kp.SetKeyboard(); // select the internal keyboard
+ memcpy(&tiny, kp.GetKeyboard(), sizeof(Keypad::keyboard_t));
tiny.x = x; tiny.y = y;
tiny.width = w; tiny.height=h;
@@ -165,4 +170,3 @@
wait(5);
}
}
-