jsmcortina wrote:With the change to interrupt driven sending, we likely could remove a few. However, I'd expect the change in mainloop time to be barely measurable.
Removed all but one (1) realtime() call out of the mainloop. Went for a drive and found the logging behaviour to be as consistent as before. Probably need to do some more before/after testing but given how quick the mainloop cycles, I doubt having just one realtime() will impact the overall "realtime-ness or freshness" of the data being sent to the serial buffer.
Obviously I also need to confirm what the change has produced in terms of benefits, but from a clean code perspective, it would have benefits by keeping the number of bytes used down and reduce clutter etc, I know it is only small amounts, but every byte can impact and needless calls that don't add value surely should be removed - certainly didn't have an ill effects and can't see how it could either.
There is also some calls in the realtime() that I need to better understand - like cp_page() that only really runs if flagbyte6 & FLAGBYTE6_PAGECOPY is set, yet nowhere I could find in the code that actually sets that bit to be on, so from what I can quickly find, nothing would result in that code running, yet it takes up ram space???