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:
- 3:baff75bbb78e
- Parent:
- 2:d93832fe8deb
- Child:
- 4:8a86bacddcac
--- a/main.cpp Fri Dec 02 09:04:29 2016 +0000
+++ b/main.cpp Fri Dec 02 09:36:06 2016 +0000
@@ -46,6 +46,7 @@
float Vy;
int SW,iVxVy,iSW,n;
int iShipType = 0;
+ unsigned long int uli = 0;
char m;
while(1) {
if(iShipType<8){
@@ -67,6 +68,7 @@
check_ready();
printf("select_Position = %d\n",select_Position);
iVxVy = 1;
+ check_ready();
}
if(SW==0 && iSW==0){ //______________________________________________If switch pressing by human.
printf("Wait!\n");
@@ -79,10 +81,16 @@
check_ready();
iSW = 1;
print_metrix();
+ check_ready();
}
}else{
- if(enemy_ready!=1){bt.putc('E');}
-
+ if(enemy_ready!=1){
+ printf("sent E\n");
+ while(uli<5000){
+ bt.putc('E');
+ uli++;
+ }
+ }
printf("\n");
break;
}