simulate satellite program structure

Dependencies:   mbed HeptaBattery SDFileSystem

Fork of Lab7-01_template by HEPTA-Sat Training 2017~2018

Files at this revision

API Documentation at this revision

Comitter:
HEPTA
Date:
Tue Aug 20 10:02:15 2019 +0000
Parent:
18:06b1abe54c73
Commit message:
revision;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 06b1abe54c73 -r 67ec6c9b7451 main.cpp
--- a/main.cpp	Tue Aug 14 10:38:52 2018 +0000
+++ b/main.cpp	Tue Aug 20 10:02:15 2019 +0000
@@ -34,6 +34,7 @@
     float bt;
     int flag = 0;
     char str[100];
+    receive(&rcmd,&cmdflag);
     while(1) {
         battery.vol(&bt);
         if(bt <= 3.5) {
@@ -48,7 +49,6 @@
             pc.printf("Power saving mode ON\r\n");
         }
         wait(0.5);
-        receive(&rcmd,&cmdflag);
         if (cmdflag == 1) {
             pc.printf("Command Get = %d\r\n",rcmd);
             if (rcmd == 'a') {