mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-21 06:05:18 -04:00
Add debug_log, fix tx_bht (#1149)
This commit is contained in:
parent
3db2053c21
commit
19491ce3f7
6 changed files with 32 additions and 24 deletions
|
@ -26,12 +26,26 @@
|
|||
#include <hal.h>
|
||||
#include <string>
|
||||
|
||||
#include "log_file.hpp"
|
||||
#include "portapack.hpp"
|
||||
#include "string_format.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
|
||||
using namespace ui;
|
||||
|
||||
#define DEBUG_LOG_FILE "debug_log.txt"
|
||||
LogFile* pg_debug_log = nullptr;
|
||||
void __debug_log(const std::string& msg) {
|
||||
static LogFile s_log;
|
||||
if (pg_debug_log == nullptr) {
|
||||
delete_file(DEBUG_LOG_FILE);
|
||||
s_log.append(DEBUG_LOG_FILE);
|
||||
pg_debug_log = &s_log;
|
||||
}
|
||||
|
||||
pg_debug_log->write_entry(msg);
|
||||
}
|
||||
|
||||
void runtime_error(LED);
|
||||
std::string number_to_hex_string(uint32_t);
|
||||
void draw_line(int32_t, const char*, regarm_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue