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.
Dependencies: HEPTA_SENSOR mbed HEPTA_EPS HEPTA_COM HEPTA_CDH
Revision 28:5c82ee674ad9, committed 2020-10-22
- Comitter:
- HeptaSatTraining2019
- Date:
- Thu Oct 22 07:14:50 2020 +0000
- Parent:
- 27:06ec1277807c
- Commit message:
- fix if condition
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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') {