1

use static logger

This commit is contained in:
2022-07-22 23:32:46 +02:00
parent ec09b0e6d2
commit bd95c02a08
24 changed files with 139 additions and 151 deletions

View File

@ -148,7 +148,7 @@ void LFBgraphics::drawStraightLine(unsigned int x1, unsigned int y1, unsigned in
this->drawPixel(i, y1, col);
}
} else {
log << ERROR << "Line is not straight" << endl;
// Not straight
}
}

View File

@ -16,7 +16,6 @@
#define __LFBgraphics_include__
#include "devices/fonts/Fonts.h"
#include "user/lib/Logger.h"
// Hilfsfunktionen um Farbwerte fuer einen Pixel zu erzeugen
#define RGB_24(r, g, b) (unsigned int)((r << 16) + (g << 8) + b)
@ -28,8 +27,6 @@ class LFBgraphics {
private:
LFBgraphics(const LFBgraphics& copy) = delete; // Verhindere Kopieren
Logger log;
// Hilfsfunktion fuer drawString
void drawMonoBitmap(unsigned int x, unsigned int y,
unsigned int width, unsigned int height,
@ -42,7 +39,7 @@ public:
unsigned int hfb; // Adresse des versteckten Buffers (optional, fuer Animationen)
unsigned int mode; // Zeichnen im sichtbaren = 1 oder unsichtbaren = 0 Puffer
LFBgraphics() : log("LFBgraphics"), mode(BUFFER_VISIBLE) {};
LFBgraphics() : mode(BUFFER_VISIBLE) {};
void clear();
void drawPixel(unsigned int x, unsigned int y, unsigned int col);

View File

@ -21,15 +21,13 @@ private:
enum { time_base = 838 }; /* ns */
int timer_interval;
Logger log;
char indicator[4] = {'|', '/', '-', '\\'};
unsigned int indicator_pos = 0;
unsigned long last_indicator_refresh = 0;
public:
// Zeitgeber initialisieren.
PIT(int us) : log("PIT") {
PIT(int us) {
this->interval(us);
}

View File

@ -82,12 +82,12 @@ bool VESA::initGraphicMode(unsigned short mode) {
// Signaturen pruefen
if (BC_params->AX != 0x004F) {
log << ERROR << "VESA wird nicht unterstuetzt." << endl;
log.error() << "VESA wird nicht unterstuetzt." << endl;
return false;
}
if (ib->VbeSignature[0] != 'V' || ib->VbeSignature[1] != 'E' ||
ib->VbeSignature[2] != 'S' || ib->VbeSignature[3] != 'A') {
log << ERROR << "VESA wird nicht unterstuetzt." << endl;
log.error() << "VESA wird nicht unterstuetzt." << endl;
return false;
}
@ -109,7 +109,7 @@ bool VESA::initGraphicMode(unsigned short mode) {
// Text-Modi 0-3 haben keinen LFB
if (mode > 3 && (minf->attributes & 0x90) == 0) {
log << ERROR << "Grafikmodus bietet keinen linearen Framebuffer." << endl;
log.error() << "Grafikmodus bietet keinen linearen Framebuffer." << endl;
return false;
}
@ -128,6 +128,6 @@ bool VESA::initGraphicMode(unsigned short mode) {
return true;
}
}
log << ERROR << "Grafikmodus nicht gefunden." << endl;
log.error() << "Grafikmodus nicht gefunden." << endl;
return false;
}

View File

@ -25,7 +25,7 @@
class VESA : public LFBgraphics {
private:
int mode_nr; // Nummer des Modus
Logger log;
NamedLogger log;
VESA(const VESA& copy) = delete; // Verhindere Kopieren