File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
FprimeZephyrReference/Components Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,11 @@ Drv::Acceleration Lsm6dsoManager ::accelerationRead_handler(FwIndexType portNum)
4343 sensor_channel_get (lsm6dso, SENSOR_CHAN_ACCEL_Y, &y);
4444 sensor_channel_get (lsm6dso, SENSOR_CHAN_ACCEL_Z, &z);
4545
46- return Drv::Acceleration (Drv::sensor_value_to_f64 (x), Drv::sensor_value_to_f64 (y), Drv::sensor_value_to_f64 (z));
46+ Drv::Acceleration acceleration =
47+ Drv::Acceleration (Drv::sensor_value_to_f64 (x), Drv::sensor_value_to_f64 (y), Drv::sensor_value_to_f64 (z));
48+
49+ this ->tlmWrite_Acceleration (acceleration);
50+ return acceleration;
4751}
4852
4953Drv::AngularVelocity Lsm6dsoManager ::angularVelocityRead_handler (FwIndexType portNum) {
@@ -65,6 +69,7 @@ Drv::AngularVelocity Lsm6dsoManager ::angularVelocityRead_handler(FwIndexType po
6569 Drv::AngularVelocity angular_velocity =
6670 Drv::AngularVelocity (Drv::sensor_value_to_f64 (x), Drv::sensor_value_to_f64 (y), Drv::sensor_value_to_f64 (z));
6771
72+ this ->tlmWrite_AngularVelocity (angular_velocity);
6873 return angular_velocity;
6974}
7075
@@ -80,6 +85,8 @@ F64 Lsm6dsoManager ::temperatureRead_handler(FwIndexType portNum) {
8085
8186 sensor_channel_get (lsm6dso, SENSOR_CHAN_DIE_TEMP, &temp);
8287
88+ this ->tlmWrite_Temperature (Drv::sensor_value_to_f64 (temp));
89+
8390 return Drv::sensor_value_to_f64 (temp);
8491}
8592
Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ ImuManager ::~ImuManager() {}
2222// ----------------------------------------------------------------------
2323
2424void ImuManager ::run_handler (FwIndexType portNum, U32 context) {
25- this -> tlmWrite_Acceleration ( this -> accelerationRead_out ( 0 ));
26- this ->tlmWrite_AngularVelocity ( this -> angularVelocityRead_out ( 0 ) );
27- // this->tlmWrite_MagneticField(this->magneticFieldRead_out(0) );
28- this ->tlmWrite_Temperature ( this -> temperatureRead_out (0 ) );
25+ // Read from Lsm6dsoManager
26+ this ->accelerationRead_out ( 0 );
27+ this ->angularVelocityRead_out ( 0 );
28+ this ->temperatureRead_out (0 );
2929
30+ // Read from Lis2mdlManager
3031 this ->magneticFieldRead_out (0 );
3132}
3233} // namespace Components
Original file line number Diff line number Diff line change @@ -20,6 +20,5 @@ module Components {
2020 ###############################################################################
2121 @ Port for requesting the current time
2222 time get port timeCaller
23-
2423 }
2524}
You can’t perform that action at this time.
0 commit comments