Sensor data not always being logged?

I’ve made a prop RPM sensor that speaks to the Pixhawk over I2C and am having trouble getting the data to log consistently, as in half the time I start up the Pixhawk with the sensor attached, the whole RPM topic does not show up in the log. The other half the time, it works fine.

Testing the sensor in NuttShell, it seems like the driver for the sensor runs on startup and the pixhawk is able to collect data from it. Does anyone have any ideas what could be causing it to not log?

I am also using an I2C airspeed sensor and that one logs consistently, so the problem is likely with my sensor or how I set it up, not the Pixhawk itself.

Edit: after a couple more tests, it seems like sometimes the driver does not initialize when the Pixhawk is first connected to power–I connect the Pixhawk to battery power, then connect it over USB to nsh and run “rpm test”, and the console informs me that the driver isn’t running. I am then able to start it by running “rpm start -b 2”.

My first guess is other optional drivers attempting to start (probe) are interfering.

Try adding some debugging to your driver and connect a serial console. Then see what’s happening during bootup.