mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2024-07-02 14:34:13 +02:00
Added landscape mode rendering
This commit is contained in:
parent
9f1021d30a
commit
5193a2fe13
10
Display.h
10
Display.h
@ -64,6 +64,9 @@ bool display_init() {
|
|||||||
#elif BOARD_MODEL == BOARD_RNODE_NG_21
|
#elif BOARD_MODEL == BOARD_RNODE_NG_21
|
||||||
disp_mode = DISP_MODE_PORTRAIT;
|
disp_mode = DISP_MODE_PORTRAIT;
|
||||||
display.setRotation(3);
|
display.setRotation(3);
|
||||||
|
#elif BOARD_MODEL == BOARD_LORA32_V2_1
|
||||||
|
disp_mode = DISP_MODE_LANDSCAPE;
|
||||||
|
display.setRotation(0);
|
||||||
#else
|
#else
|
||||||
disp_mode = DISP_MODE_PORTRAIT;
|
disp_mode = DISP_MODE_PORTRAIT;
|
||||||
display.setRotation(3);
|
display.setRotation(3);
|
||||||
@ -228,7 +231,12 @@ void draw_stat_area() {
|
|||||||
|
|
||||||
void update_stat_area() {
|
void update_stat_area() {
|
||||||
draw_stat_area();
|
draw_stat_area();
|
||||||
display.drawBitmap(p_as_x, p_as_y, stat_area.getBuffer(), stat_area.width(), stat_area.height(), SSD1306_WHITE, SSD1306_BLACK);
|
if (disp_mode == DISP_MODE_PORTRAIT) {
|
||||||
|
display.drawBitmap(p_as_x, p_as_y, stat_area.getBuffer(), stat_area.width(), stat_area.height(), SSD1306_WHITE, SSD1306_BLACK);
|
||||||
|
} else if (disp_mode == DISP_MODE_LANDSCAPE) {
|
||||||
|
display.drawBitmap(p_as_x+2, p_as_y, stat_area.getBuffer(), stat_area.width(), stat_area.height(), SSD1306_WHITE, SSD1306_BLACK);
|
||||||
|
display.drawLine(p_as_x, 0, p_as_x, 64, SSD1306_WHITE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define START_PAGE 1
|
#define START_PAGE 1
|
||||||
|
Loading…
Reference in New Issue
Block a user