Macro to trace log all MeshPackets as JSON (#4336)

* Macro to trace log all MeshPackets as JSON

* Comment

* Add trace logging to file for native target

* bytes to hex

* Add time_ms

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
This commit is contained in:
Ben Meadors
2024-07-28 19:49:10 -05:00
committed by GitHub
parent 8b0208d1c6
commit 811a9ae261
7 changed files with 113 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
#pragma once
#include <fstream>
#include <map>
enum configNames {
@@ -46,6 +47,7 @@ enum configNames {
displayInvert,
keyboardDevice,
logoutputlevel,
traceFilename,
webserver,
webserverport,
webserverrootpath,
@@ -53,8 +55,9 @@ enum configNames {
};
enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9488, hx8357d };
enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 };
enum { level_error, level_warn, level_info, level_debug };
enum { level_error, level_warn, level_info, level_debug, level_trace };
extern std::map<configNames, int> settingsMap;
extern std::map<configNames, std::string> settingsStrings;
extern std::ofstream traceFile;
int initGPIOPin(int pinNum, std::string gpioChipname);