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: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of COM_MNG_TMTC_SIMPLE by
Diff: Structures.h
- Revision:
- 102:80c911a6e736
- Parent:
- 52:0bd68655c651
- Child:
- 103:b55559925dc1
--- a/Structures.h Tue Jan 26 13:15:01 2016 +0000
+++ b/Structures.h Fri Jan 29 17:09:41 2016 +0000
@@ -97,23 +97,15 @@
};
// TELEMETRY:
-// MASKS
-#define SHORT_LONG_TM_MASK 0x10
-#define TMID_MASK 0x0F
+// MASK
+#define SHORT_LONG_TM_MASK 0x80
-//x should be 'fields' variable defined in the Base_tm
-#define GETshort_or_long_tm(x) ((x & SHORT_LONG_TM_MASK) >> 4)
-#define GETtmid(x) (x & TMID_MASK)
-
-//x should be 'fields' variable defines in the Base_tm
-//y should be an 8-bit number with relevent data at LSB
-#define PUTshort_or_long_tm(x,y) x = (x & ~(SHORT_LONG_TM_MASK)) | ((y<<4) & SHORT_LONG_TM_MASK)
-#define PUTtmid(x,y) x = (x & ~(TMID_MASK)) | (y & TMID_MASK)
+//x should be 'Base tm' pointer
+#define GETshort_or_long_tm(x) ((x->TM_string[0] & SHORT_LONG_TM_MASK) >> 7)
// PARENT TELEMETRY CLASS
class Base_tm{
public:
- uint8_t fields;
uint8_t *TM_string;
Base_tm *next_TM;
@@ -129,7 +121,6 @@
Long_tm(){
TM_string = fix_str;
// type 0
- fields = 0;
}
~Long_tm(){}
@@ -144,7 +135,6 @@
Short_tm(){
TM_string = fix_str;
// type 1
- fields = 0x10;
}
~Short_tm(){}
