No, we do allow log writes in other threads. It’s just the startup
messagewriters we don’t allow to be run from other threads.
It might be that we need to add some time constraints in around the log
message writers. Each of the while() loops in each of the ::process
methods would need a check to see if we’re out of time for writing more
messages.
I think a bit of profiling might be a good idea first; we also open the
file in the main thread - that could also be causing the issue.
@chobitsfan Awesome! I just saw this. I have been very busy lately but I am very happy to see that this issue has not been forgotten. I will pull this change into my code asap and test it over the next few days. Hopefully your work will solve this issue because this seemingly insignificant issue has caused me lots of trouble.
@chobitsfan Didn’t need long to determine that it works! Awesome job. No more altitude errors on arming! Thank you very much for your efforts. This has been incredibly helpful and much appreciated.
I have had trouble in Rover for some time where the first arming after boot fails due to excess main loop time. I have coded around this by extending the maximum delay within a set time after boot but I suspect that the root cause is the same as discussed here. I will test this tomorrow - thanks @chobitsfan!