Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions sources/Adapters/adv/gui/advGUIWindowImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,11 @@ void advGUIWindowImp::DrawChar(const char c, GUIPoint &pos,
GUITextProperties &p) {
// Trace::Debug("Draw char \"%c\" at pos x:%ld (%ld), y:%ld (%ld) - invert:
// %d", c, pos._x, pos._x / 8, pos._y, pos._y / 8, p.invert_);

uint8_t x = pos._x / 8;
uint8_t y = pos._y / 8;
display_set_cursor(x, y);
display_set_cursor(pos._x, pos._x);
display_putc(c, p.invert_);
if (remoteUIEnabled_) {
char remoteUIBuffer[6];
remoteUIDrawCharCommand(c, x, y, p.invert_, remoteUIBuffer);
remoteUIDrawCharCommand(c, pos._x, pos._y, p.invert_, remoteUIBuffer);
sendToUSBCDCBuffered(remoteUIBuffer, 6); // Use the buffered function
}
}
Expand Down Expand Up @@ -136,9 +133,9 @@ void advGUIWindowImp::SetColor(GUIColor &c) {
}
};

void advGUIWindowImp::Lock(){};
void advGUIWindowImp::Lock() {}

void advGUIWindowImp::Unlock(){};
void advGUIWindowImp::Unlock() {}

void advGUIWindowImp::Flush() {
display_draw_changed();
Expand Down
27 changes: 12 additions & 15 deletions sources/Adapters/picoTracker/gui/picoTrackerGUIWindowImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ picoTrackerGUIWindowImp::picoTrackerGUIWindowImp(GUICreateWindowParams &p) {
if (remoteUIEnabled_) {
SendFont(uifontIndex);
}
};
}

picoTrackerGUIWindowImp::~picoTrackerGUIWindowImp() {}

Expand All @@ -68,14 +68,11 @@ void picoTrackerGUIWindowImp::DrawChar(const char c, GUIPoint &pos,
GUITextProperties &p) {
// Trace::Debug("Draw char \"%c\" at pos x:%ld (%ld), y:%ld (%ld) - invert:
// %d", c, pos._x, pos._x / 8, pos._y, pos._y / 8, p.invert_);

uint8_t x = pos._x / 8;
uint8_t y = pos._y / 8;
chargfx_set_cursor(x, y);
chargfx_set_cursor(pos._x, pos._y);
chargfx_putc(c, p.invert_);
if (remoteUIEnabled_) {
char remoteUIBuffer[6];
remoteUIDrawCharCommand(c, x, y, p.invert_, remoteUIBuffer);
remoteUIDrawCharCommand(c, pos._x, pos._y, p.invert_, remoteUIBuffer);
sendToUSBCDC(remoteUIBuffer, 6);
}
}
Expand All @@ -93,7 +90,7 @@ void picoTrackerGUIWindowImp::DrawRect(GUIRect &r) {
r.Height(), remoteUIBuffer);
sendToUSBCDC(remoteUIBuffer, bufferIndex);
}
};
}

void picoTrackerGUIWindowImp::Clear(GUIColor &c, bool overlay) {
chargfx_color_t backgroundColor = GetColor(c);
Expand All @@ -106,11 +103,11 @@ void picoTrackerGUIWindowImp::Clear(GUIColor &c, bool overlay) {
Trace::Debug("sent clear command: %d,%d,%d", c._r, c._g, c._b);
sendToUSBCDC(remoteUIBuffer, 5);
}
};
}

void picoTrackerGUIWindowImp::ClearTextRect(GUIRect &r) {
Trace::Debug("GUI ClearTextRect call");
};
}

chargfx_color_t picoTrackerGUIWindowImp::GetColor(GUIColor &c) {
// Palette index should always be < 16
Expand Down Expand Up @@ -148,21 +145,21 @@ void picoTrackerGUIWindowImp::SetColor(GUIColor &c) {
sendToUSBCDC(remoteUIBuffer, bufferIndex);
// Trace::Debug("sent set color: %d,%d,%d", c._r, c._g, c._b);
}
};
}

void picoTrackerGUIWindowImp::Lock(){};
void picoTrackerGUIWindowImp::Lock() {}

void picoTrackerGUIWindowImp::Unlock(){};
void picoTrackerGUIWindowImp::Unlock() {}

void picoTrackerGUIWindowImp::Flush() { chargfx_draw_changed(); };
void picoTrackerGUIWindowImp::Flush() { chargfx_draw_changed(); }

void picoTrackerGUIWindowImp::Invalidate() {
picoTrackerEventQueue::GetInstance()->push(picoTrackerEvent(PICO_FLUSH));
};
}

void picoTrackerGUIWindowImp::PushEvent(GUIEvent &event) {
Trace::Debug("GUI PushEvent");
};
}

GUIRect picoTrackerGUIWindowImp::GetRect() {
Trace::Debug("GUI GetRect");
Expand Down
7 changes: 2 additions & 5 deletions sources/Application/AppWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ GUIColor AppWindow::reserved4Color_(0xFF, 0xFF, 0x00, 15);
// Initialize the animation frame counter
uint32_t AppWindow::animationFrameCounter_ = 0;

int AppWindow::charWidth_ = 8;
int AppWindow::charHeight_ = 8;

void AppWindow::defineColor(FourCC colorCode, GUIColor &color,
int paletteIndex) {

Expand Down Expand Up @@ -351,9 +348,9 @@ void AppWindow::Flush() {
previous++;
currentProp++;
previousProp++;
pos._x += AppWindow::charWidth_;
pos._x++;
}
pos._y += AppWindow::charHeight_;
pos._y++;
pos._x = 0;
}
GUIWindow::Flush();
Expand Down