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: Adafruit_GFX_128x64 DS3231 PinDetect SDFileSystem USBDevice mbed RealtimeMath MODSERIAL
Diff: main.cpp
- Revision:
- 19:4f4f7bc4a3fb
- Parent:
- 18:06b718f8e6fd
- Parent:
- 17:fb8415091770
- Child:
- 20:294eaeaf2ebb
diff -r 06b718f8e6fd -r 4f4f7bc4a3fb main.cpp
--- a/main.cpp Thu Jun 05 19:09:07 2014 +0000
+++ b/main.cpp Thu Jun 05 19:23:53 2014 +0000
@@ -92,12 +92,21 @@
while (State == CAPTURE) {
data = receive_data();
log_data(data);
-// int split = process_data(data->x);
-// if (split != UINT16_MAX) {
-// PC_PRINTLNF("Split time: %d", split);
-// OLED_PRINTPF("Split: %d", split, 0, 40);
-// log_data(split);
-// }
+
+ int split;
+ if (process_data(data->y, &split)) {
+ PC_PRINTLNF("Split time: %d", split);
+
+ int min = split / 60000;
+ int sec = (split / 1000) % 60;
+ int hund = (split / 10) % 100;
+
+ OLED_PRINTPF("%1d", min, 0, 40);
+ OLED_PRINTPF("%02d", sec, 5, 40);
+ oled.drawPixel(14, 44, 0x1);
+ OLED_PRINTPF("%02d", hund, 15, 40);
+ log_data(split);
+ }
}
receive_close();