@@ -47,7 +47,17 @@ SystemManager::SystemManager()
4747 // BUT I FEEL LIKE SM PM WOULD KNOW WHERE. MAYBE IN THE HPP FILE? IDK HOW YOU ARE PLANNING ON
4848 // GATHERING THE DATA. I JUST PUT THEM HERE FOR NOW
4949
50- // Struct containing the state of the drone
50+
51+ this ->telemetryManager = setupTM ();
52+ this ->telemetryManager ->init ();
53+
54+ // IDK WHERE SM PLANS TO DO THIS, BUT telemetryManager.update() NEEDS TO BE CALLED AT A SEMI
55+ // REGULAR INTERVAL AS IT DEALS WITH MESSAGE DECODING AND LOW PRIORITY DATA TRANSMISSION
56+ }
57+
58+ TelemetryManager* SystemManager::setupTM () {
59+
60+ // Struct containing the state of the drone
5161 TMStateData stateData;
5262
5363 // values to be assigned to stateData
@@ -106,10 +116,8 @@ SystemManager::SystemManager()
106116 // the buffer that stores the bytes received from the ground station.
107117 MavlinkTranslator MT;
108118
109- this ->telemetryManager = new TelemetryManager (stateData, mavState, mavMode, GSC, MT);
110- this ->telemetryManager ->init ();
111- // IDK WHERE SM PLANS TO DO THIS, BUT telemetryManager.update() NEEDS TO BE CALLED AT A SEMI
112- // REGULAR INTERVAL AS IT DEALS WITH MESSAGE DECODING AND LOW PRIORITY DATA TRANSMISSION
119+
120+ return new TelemetryManager (stateData, mavState, mavMode, GSC, MT);
113121}
114122
115123// wrapper functions are needed as FreeRTOS xTaskCreate function does not accept functions that have
0 commit comments