Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
301:701ac67649b7
Parent:
292:61aa2169ea1c
Child:
303:b49b486a7107
diff -r 609c3e4240c9 -r 701ac67649b7 CDMS_HK.h
--- a/CDMS_HK.h	Sat Sep 03 16:44:56 2016 +0000
+++ b/CDMS_HK.h	Sun Sep 04 11:12:00 2016 +0000
@@ -66,6 +66,7 @@
 
     FCTN_CDMS_HK();//collects temperatures
     RSSI_volatge = COMRX_RSSI_volatge.read() * 3.3;//to be checked
+    gPC.printf("\n%f\n",RSSI_volatge);
     VERIFY_COMRX();
     VERIFY_RTC();
     HANDLE_HW_FAULTS();
@@ -519,36 +520,37 @@
     CDMS_RAM[17] = SD_LIB_WRITES >> 8;
     CDMS_RAM[18] = SD_LIB_WRITES;
     for(int i = 0; i<4; i++)
-        CDMS_RAM[19+i] = TIME_LATEST_RTC >> i*8;
+        CDMS_RAM[19+i] = TIME_LATEST_RTC >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[23+i] = TIME_LATEST_I2C_BAE >> i*8;
+        CDMS_RAM[23+i] = TIME_LATEST_I2C_BAE >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[27+i] = TIME_LATEST_I2C_SPEED >> i*8;
+        CDMS_RAM[27+i] = TIME_LATEST_I2C_SPEED >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[31+i] = TIME_LATEST_SD_WR >> i*8;
+        CDMS_RAM[31+i] = TIME_LATEST_SD_WR >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[35+i] = TIME_LATEST_SD_RD >> i*8;
+        CDMS_RAM[35+i] = TIME_LATEST_SD_RD >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[39+i] = TIME_LATEST_SPI_SPEED >> i*8;
+        CDMS_RAM[39+i] = TIME_LATEST_SPI_SPEED >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[43+i] = FSC_CURRENT[1] >> i*8;
+        CDMS_RAM[43+i] = FSC_CURRENT[1] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[47+i] = FSC_LAST[1] >> i*8;
+        CDMS_RAM[47+i] = FSC_LAST[1] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[51+i] = FSC_CURRENT[2] >> i*8;
+        CDMS_RAM[51+i] = FSC_CURRENT[2] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[55+i] = FSC_LAST[2] >> i*8;
+        CDMS_RAM[55+i] = FSC_LAST[2] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[59+i] = FSC_CURRENT[3] >> i*8;
+        CDMS_RAM[59+i] = FSC_CURRENT[3] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[63+i] = FSC_LAST[3] >> i*8;
+        CDMS_RAM[63+i] = FSC_LAST[3] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[67+i] = FSC_CURRENT[4] >> i*8;
+        CDMS_RAM[67+i] = FSC_CURRENT[4] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[71+i] = FSC_LAST[4] >> i*8;
+        CDMS_RAM[71+i] = FSC_LAST[4] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[75+i] = FSC_CURRENT[5] >> i*8;
+        CDMS_RAM[75+i] = FSC_CURRENT[5] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[79+i] = FSC_LAST[5] >> i*8;
+        CDMS_RAM[79+i] = FSC_LAST[5] >> ((3-i)*8);
     CDMS_RAM[83] = 0x00;
+    gPC.printf("%d %d %d %d %d\n",FSC_CURRENT[1],FSC_CURRENT[2],FSC_CURRENT[3],FSC_CURRENT[4],FSC_CURRENT[5]);
 }
\ No newline at end of file