fprime-community / fprime-baremetal-reference

Apache License 2.0
5 stars 4 forks source link

`imu.PowerSwitch` state is set to OFF by default #19

Closed capsulecorplab closed 6 months ago

capsulecorplab commented 6 months ago

I'm not sure if this is intended behavior, but I had to send a imu.PowerSwitch, ON command in order to start receiving accelerometer and gyro telemetry. Is there a way to set the imu.PowerSwitch default value to ON?

ethancheez commented 6 months ago

I had it OFF by default in case someone were to use the BaremetalReference without the IMU. If it was defaulted to ON, but the user did not have an IMU connected, there will be a continuous event in fprime-gds indicating that the I2C address cannot be found.

Is there a way to set the imu.PowerSwitch default value to ON?

Yes, you can edit this line to:

m_power(Fw::On::ON)
capsulecorplab commented 6 months ago

Awesome! I'll close this issue as this is clearly a feature not a bug and that I can turn it on if need be. Thanks!