markqvist / RNode_Firmware

RNode is an open, free and flexible digital radio interface with many uses
https://unsigned.io/rnode
GNU General Public License v3.0
145 stars 52 forks source link

Robust logging implementation #69

Closed jacobeva closed 1 month ago

jacobeva commented 5 months ago

The current logging implementation basically consists of a couple of Serial.prints on certain conditions.

A robust logging implementation similar to that of Meshtastic should be designed so as to allow for much easier debugging on the host side. Perhaps the RNode should send this over the serial interface following a certain set of bytes, which indicates to RNS this is a log message. Then, the message can be logged and more easily debugged.

jacobeva commented 5 months ago

I say this is an important feature from experience ;)

faragher commented 5 months ago

While useful, I worry about the amount of memory the strings would take up. I'd also like to suggest this be a toggleable feature which defaults to off to keep serial traffic down. Still, could be quite useful if properly used.

jacobeva commented 5 months ago

Indeed, PROGMEM should be used to minimise this. This should also be toggleable, I agree, whether it should be on or off by default is up for debate I suppose. I personally don't think it would be too hard on serial traffic, especially given most boards operate at 112500 nowadays.

jacobeva commented 5 months ago

Perhaps a byte in the EEPROM for logging toggling is in order...

jacobeva commented 1 month ago

Issue will be addressed in the community fork.