rev20211120

Dependencies:   HEPTA_SENSOR mbed HEPTA_EPS HEPTA_COM HEPTA_CDH

Revision:
28:5c82ee674ad9
Parent:
27:06ec1277807c
Child:
29:3d5175dfeb10
diff -r 06ec1277807c -r 5c82ee674ad9 main.cpp
--- a/main.cpp	Wed Jul 22 03:09:47 2020 +0000
+++ b/main.cpp	Thu Oct 22 07:14:50 2020 +0000
@@ -49,16 +49,19 @@
         eps.power_saving_mode(&flag,&btvol);
         sensor.temp_sense(&temp);
         gs.printf("HEPTASAT::Condition = %d, Time = %f [s], BatVol = %.2f [V],Temp = %.2f [C]\r\n",flag,sattime,btvol,temp);
+        
         //Condition
         cond[0] = 1;
+        
         //Warning the status of temperature and battery voltage
-        if(flag == 1) {
-            gs.printf("Low Battery\r\n");
+        if((flag == 1) & (temp > 35.0)) {
+            gs.printf("Low Battery and High temperature\n");
         } else if(temp > 35.0) {
             gs.printf("High temperature\r\n");
-        } else if((flag == 1) & (temp > 35.0)) {
-            gs.printf("Low Battery and High temperature\n");
+        } else if(flag == 1) {
+            gs.printf("Low Battery\r\n");
         }
+        
         //Contents of command
         if (cmdflag == 1) {
             if (rcmd == 'a') {