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: Picaso_4DGL-32PTU_main.cpp
- Revision:
- 6:a1a85f2bc04b
- Parent:
- 5:890ddd974624
- Child:
- 11:3ebd2263f3e9
diff -r 890ddd974624 -r a1a85f2bc04b Picaso_4DGL-32PTU_main.cpp
--- a/Picaso_4DGL-32PTU_main.cpp Mon Sep 12 10:15:54 2016 +0000
+++ b/Picaso_4DGL-32PTU_main.cpp Mon Sep 12 11:25:37 2016 +0000
@@ -75,14 +75,9 @@
while(1) {
if(_cmd.readable()) {
- //pc.printf("\n\n\r CALLBACK %02X\n\n\r", _cmd.getc());
- //ack = 1;
- //pc.printf("\n\r INDEX = %i\n\r", index);
rxBuf[index++] = _cmd.getc();
- //trig = 1;
break;
}
- pc.printf("\n\r...PSC...\n\r");
}
}
@@ -257,6 +252,24 @@
}
//**************************************************************************
+void PICASO_4DGL :: calculateOrbitResponse() {
+
+ pc.printf("\n\r Wait for answer...");
+ while (index < 5) wait_ms(100); // wait for screen answer
+
+ pc.printf("\n\r INDEX = %i\n\r", index);
+ pc.printf("\n\r Answer = ");
+ for (int i = 0; i < index; i++) {
+ pc.printf("%02X ", rxBuf[i]);
+ }
+ pc.printf("\n\r");
+ Xdest = rxBuf[1] << 8 | rxBuf[2];
+ Ydest = rxBuf[3] << 8 | rxBuf[4];
+ pc.printf("\n\r New coordiantes = %i x %i\n\r", Xdest, Ydest);
+ index = 0;
+}
+
+//**************************************************************************
void PICASO_4DGL :: screenOrientation(char c) { // select screen orientation
char command[4] = "";
command[0] = (ORIENTATION >> (8*1)) & 0xff;