for textbook v4.4
Dependencies: HEPTA_SENSOR mbed HEPTA_EPS HEPTA_COM HEPTA_CDH
Revision 29:ee99adca8a02, committed 2021-11-14
- Comitter:
- heptasat2021
- Date:
- Sun Nov 14 10:23:46 2021 +0000
- Parent:
- 28:80d6576011e1
- Commit message:
- fix_for_text4.4
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 80d6576011e1 -r ee99adca8a02 main.cpp --- a/main.cpp Sun Nov 14 08:10:45 2021 +0000 +++ b/main.cpp Sun Nov 14 10:23:46 2021 +0000 @@ -5,7 +5,6 @@ Serial gs(USBTX,USBRX); // for ground station HEPTA_CDH cdh(p5, p6, p7, p8, "sd"); HEPTA_EPS eps(p16,p26); -Timer sattime; int rcmd = 0,cmdflag = 0; //command variable //getting command and flag @@ -26,20 +25,19 @@ cmdflag = 0; cond[0] = 0; } - + int main() { gs.baud(9600); gs.printf("From Sat : Operation Start...\r\n"); int flag = 0; // condition - float btvol,temp; //Voltage, Temerature - sattime.start(); + float sattime=0.0,btvol,temp; //Voltage, Temerature receive(rcmd,cmdflag); //interupting by ground station command for(int i = 0; i < 100; i++) { //Sensing and Transmitting HK data eps.vol(&btvol); temp = 28.5; - gs.printf("HEPTASAT::Condition = %d, Time = %f [s], batVol = %.2f [V],Temp = %.2f [C]\r\n",flag,sattime.read(),btvol,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; //Power Saving Mode @@ -65,7 +63,10 @@ } initialize(); } + + //Operation Interval + wait(1.0); + sattime = sattime+1.0; } - sattime.stop(); gs.printf("From Sat : Operation Stop...\r\n"); } \ No newline at end of file