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: main.cpp
- Revision:
- 4:73f9fd797965
- Parent:
- 3:eb3c3c9587d7
- Child:
- 5:43d5529fbe1e
--- a/main.cpp Mon Oct 28 11:46:30 2013 +0000
+++ b/main.cpp Wed Nov 20 15:57:00 2013 +0000
@@ -36,6 +36,7 @@
int main()
{
+ printf("IMHERE START\n");
int s1bytenum = 0;
char s1bytes[3];
@@ -43,9 +44,11 @@
char s2bytes[3];
char s1c, s2c;
+ printf("IMHERE GET SENSORS\n");
s1c = sensor1.getc();
+ printf("IMHERE GOT S1\n");
s2c = sensor2.getc();
-
+ printf("IMHERE GOT S2\n");
sensorToPrint[0] = sensorToPrint[1] = false;
while(1) {
@@ -58,7 +61,7 @@
s2c = sensor2.getc();
}
// TODO only prints when both are enabled now
- if (sensorToPrint[0] || sensorToPrint[1]) {
+ if (sensorToPrint[0] && sensorToPrint[1]) {
printf("%d : %d %d %d %d\n\r", 2, sensorXs[0], sensorYs[0], sensorXs[1], sensorYs[1]);
sensorToPrint[0] = sensorToPrint[1] = false;
sensorXs[0] = sensorYs[0] = sensorXs[1] = sensorYs[1] = 0;