pub async fn run_debug_output(rx: Receiver<SerialEvent>)Expand description
This function is used for debugging the data that is sent from a device. It will create a file “debug.txt” and print the data received from the device as the actual bytes received along with the corresponding ascii characters.
Data is sent from the SerialActor to this function in batches,
therefore a line written to “debug.txt” may look like this:
“[04:41:27.550] RX 9 bytes: [0D, 0A, 53, 77, 69, 74, 63, 68]… UTF8: ^M Switch#”
Each line will only print a maximum of 8 bytes, after 8 it will simply write “…”.