Meshtastic device reboots when using sendToMesh

I’ve written a custom module that takes wind sensor data every 10 seconds and then sends it out through the mesh every 5 minutes. I know best practice is to use a second board for taking and compiling measurement data but that’s for the next phase. My module works perfectly fine until it’s time to send the data to the mesh upon which it reboots the device. Is there something to do with the sendToMesh function that causes this? I’m using a rak4631 for this.

Without knowing what you added to the code it would be hard to help. Normally calling that function should work just fine.

Turns out the memory on the device was full, resetting the nodedb worked to fix it