File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
obc/examples/test_app_reliance_edge_sd/test_delete Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ #include "telemetry_fs_utils.h"
2+
3+ #include "obc_reliance_fs.h"
4+ #include "obc_spi_io.h"
5+ #include "obc_sci_io.h"
6+ #include "obc_print.h"
7+ #include "obc_errors.h"
8+ #include "obc_gs_telemetry_data.h"
9+ #include "obc_logging.h"
10+
11+ #include <FreeRTOS.h>
12+ #include <os_task.h>
13+
14+ #include <sys_common.h>
15+ #include <sci.h>
16+ #include <spi.h>
17+
18+ #include <redposix.h>
19+ #include <string.h>
20+
21+ void vTask1 (void * pvParameter ) {
22+ obc_error_code_t errCode ;
23+
24+ // Example Telem IDs:
25+ uint32_t telemBatchId = 0 ;
26+ uint32_t telemFileId = 0 ;
27+ uint32_t * p_telemFileId = & telemFileId ;
28+
29+ // Example Telem Data:
30+ telemetry_data_t telemData = {0 };
31+ telemData .obcTemp = 100 ;
32+ telemData .id = 67 ;
33+ telemData .timestamp = 1000 ;
34+
35+ // Init File System:
36+ RETURN_IF_ERROR_CODE (setupFileSystem ());
37+ sciPrint ("Initialized File System" );
38+
39+ // Creating, Writing, and Reading from example file:
40+ RETURN_IF_ERROR_CODE (createAndOpenTelemetryFileRW (telemBatchId , p_telemFileId ));
41+ sciPrint ("Successfully created and opened telemetry file!" );
42+
43+ RETURN_IF_ERROR_CODE (writeTelemetryToFile ((int32_t )telemFileId , telemData ));
44+ }
45+
46+ int main (void ) {}
You can’t perform that action at this time.
0 commit comments