getting rid of Serial.* (1)

This commit is contained in:
folkert van heusden 2024-05-19 20:38:04 +02:00
parent e7f0e18d32
commit e7b7a101e0
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
5 changed files with 13 additions and 13 deletions

View file

@ -66,7 +66,7 @@ void console_esp32::refresh_virtual_terminal()
void console_esp32::panel_update_thread() void console_esp32::panel_update_thread()
{ {
Serial.println(F("panel task started")); DOLOG(info, false, "panel task started");
cpu *const c = b->getCpu(); cpu *const c = b->getCpu();
@ -175,5 +175,5 @@ void console_esp32::panel_update_thread()
} }
#endif #endif
Serial.println(F("panel task terminating")); DOLOG(info, false, "panel task terminating");
} }

View file

@ -19,9 +19,9 @@ console_shabadge::console_shabadge(std::atomic_uint32_t *const stop_event, std::
console_esp32(stop_event, io_ports, 296 / 8, 128 / 8) console_esp32(stop_event, io_ports, 296 / 8, 128 / 8)
{ {
if (epd.Init() != 0) if (epd.Init() != 0)
Serial.println("Init of DEPG0290B01 failed"); printf("Init of DEPG0290B01 failed");
else { else {
Serial.println("DEPG0290B01 initialized"); printf("DEPG0290B01 initialized");
paint = new Paint(image, 0, 0); paint = new Paint(image, 0, 0);

View file

@ -357,7 +357,7 @@ void console::operator()()
uint8_t value = 1; uint8_t value = 1;
if (xQueueSend(have_data, &value, portMAX_DELAY) == pdFALSE) if (xQueueSend(have_data, &value, portMAX_DELAY) == pdFALSE)
Serial.println("xQueueSend failed"); TRACE("xQueueSend failed");
#else #else
have_data.notify_all(); have_data.notify_all();
#endif #endif

View file

@ -19,15 +19,15 @@
[[ noreturn ]] void error_exit(bool sys_err, const char *format, ...) [[ noreturn ]] void error_exit(bool sys_err, const char *format, ...)
{ {
#if defined(ESP32) || defined(BUILD_FOR_RP2040)
printf("Fatal error: %s\n", format);
#else
int e = errno; int e = errno;
#if !defined(_WIN32) && !defined(ESP32) && !defined(BUILD_FOR_RP2040) #if !defined(_WIN32)
(void)endwin(); (void)endwin();
#endif #endif
#if defined(ESP32) || defined(BUILD_FOR_RP2040)
Serial.println(format);
#else
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);
@ -36,7 +36,7 @@
if (sys_err == true) if (sys_err == true)
fprintf(stderr, "error: %s (%d)\n", strerror(e), e); fprintf(stderr, "error: %s (%d)\n", strerror(e), e);
#endif
exit(1); exit(1);
#endif
} }

View file

@ -7,16 +7,16 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include "log.h"
#include "memory.h" #include "memory.h"
memory::memory(const uint32_t size): size(size) memory::memory(const uint32_t size): size(size)
{ {
#if defined(ESP32) #if defined(ESP32)
Serial.print(F("Memory size (in bytes, decimal): ")); DOLOG(info, false, "Memory size (in bytes, decimal): %d", size);
Serial.println(size);
if (psramFound()) { if (psramFound()) {
Serial.println(F("Using PSRAM")); DOLOG(info, false, "Using PSRAM");
m = reinterpret_cast<uint8_t *>(ps_malloc(size)); m = reinterpret_cast<uint8_t *>(ps_malloc(size));