1
0
forked from me/IronOS

WIP: Split Render for multiple screen resolutions (#1888)

* Create README.md

* Move to new folder

* Migrating

* Migrate Remainder

* format fix (all but one) (#1889)

* Update USBPDDebug_FS2711.cpp

* Delete PrintVoltage.cpp

* Copy in 128x32 template

* Mask drawing for 96x16

* Import #1819

* Update Font.h

* Homescreen

* Update draw_homescreen_detailed.cpp

* Fix oled normal draw for variable height

* Update OLED.cpp

* Draw settings icons

* Update draw_homescreen_simplified.cpp

* Update draw_power_source_icon.cpp

* Fixup oled drawing for fill area

* Update the region fill for mixed heights

* Fix newline height

* FIXUP! Draw icons in settings menu at correct size

* Fix scrollbar

* Update settingsGUI.cpp

* S60(P) Disable auto display rotation

* On tall oled, scroll in 2 line increments

* Bugfix transition L<->R

@discip I take it back, there was a bug :)

* Draw every other one on transitions

* .

* cleanup

* Bootup logo: Draw in centre

* Update OLED.hpp

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
This commit is contained in:
Ben V. Brown
2024-07-12 08:27:05 +10:00
committed by GitHub
parent 18e936ae6d
commit 48649908a7
76 changed files with 2052 additions and 1588 deletions

View File

@@ -7,12 +7,14 @@
#include "settingsGUI.hpp"
#include "Buttons.hpp"
#include "Font.h"
#include "ScrollMessage.hpp"
#include "TipThermoModel.h"
#include "Translation.h"
#include "cmsis_os.h"
#include "configuration.h"
#include "main.hpp"
#include "ui_drawing.hpp"
#ifdef POW_DC
static void displayInputVRange(void);
@@ -114,7 +116,7 @@ static bool showHallEffect(void);
// Menu functions
#if defined(POW_DC) || defined(POW_QC)
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
static void displayPowerMenu(void);
#endif /* POW_DC or POW_QC */
@@ -206,7 +208,7 @@ const menuitem rootSettingsMenu[] {
* // Language
* Exit
*/
#if defined(POW_DC) || defined(POW_QC)
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
/* Power */
{0, nullptr, displayPowerMenu, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0},
#endif
@@ -858,10 +860,10 @@ static void displayLogoTime(void) {
OLED::drawUnavailableIcon();
break;
case logoMode_t::ONETIME:
OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, RepeatOnce);
OLED::drawArea(OLED_WIDTH - OLED_HEIGHT - 2, 0, OLED_HEIGHT, OLED_HEIGHT, RepeatOnce);
break;
case logoMode_t::INFINITY:
OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, RepeatInf);
OLED::drawArea(OLED_WIDTH - OLED_HEIGHT - 2, 0, OLED_HEIGHT, OLED_HEIGHT, RepeatInf);
break;
default:
OLED::printNumber(getSettingValue(SettingsOptions::LOGOTime), 1, FontStyle::LARGE);
@@ -1013,10 +1015,11 @@ static void displayMenu(size_t index) {
// Draw symbol
// 16 pixel wide image
// less 2 pixel wide scrolling indicator
OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[index][(16 * 2) * currentFrame]));
OLED::drawArea(OLED_WIDTH - SETTINGS_ICON_WIDTH - 2, 0, SETTINGS_ICON_WIDTH, SETTINGS_ICON_HEIGHT, (&SettingsMenuIcons[index][(SETTINGS_ICON_WIDTH * (SETTINGS_ICON_HEIGHT / 8)) * currentFrame]));
}
#if defined(POW_DC) || defined(POW_QC)
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
static void displayPowerMenu(void) { displayMenu(0); }
#endif /* POW_DC or POW_QC */