mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 28 KiB |
@@ -14,6 +14,8 @@
|
||||
// Added to the main repository with some optimizations and some limitations.
|
||||
// As long as the device is not enabled, no RAM is wasted.
|
||||
//
|
||||
// @andbad: 2026-07-09
|
||||
// ADD: 72x40 OLED size added to the the existing sizes (128x64, 128x32, 64x48)
|
||||
// @tonhuisman: 2025-03-03
|
||||
// ADD: Setting for not showing the startup logo. Formatted source using Uncrustify with recent settings
|
||||
// @uwekaditz: 2024-08-06
|
||||
@@ -305,8 +307,9 @@ boolean Plugin_036(uint8_t function, struct EventStruct *event, String& string)
|
||||
const int optionValues[] =
|
||||
{ static_cast<int>(p036_resolution::pix128x64),
|
||||
static_cast<int>(p036_resolution::pix128x32),
|
||||
static_cast<int>(p036_resolution::pix64x48) };
|
||||
OLedFormSizes(F("size"), optionValues, P036_RESOLUTION, true);
|
||||
static_cast<int>(p036_resolution::pix64x48),
|
||||
static_cast<int>(p036_resolution::pix72x40) };
|
||||
OLedFormSizes(F("size"), optionValues, P036_RESOLUTION, NR_ELEMENTS(optionValues), true);
|
||||
}
|
||||
|
||||
OLedFormRotation(F("rotate"), P036_ROTATE);
|
||||
|
||||
@@ -66,12 +66,14 @@ void OLedFormContrast(const __FlashStringHelper *id,
|
||||
void OLedFormSizes(const __FlashStringHelper *id,
|
||||
const int *values,
|
||||
uint8_t selectedIndex,
|
||||
uint8_t optionsSize,
|
||||
bool reloadOnChange) {
|
||||
const __FlashStringHelper *options3[] = {
|
||||
F("128x64"),
|
||||
F("128x32"),
|
||||
F("64x48") };
|
||||
FormSelectorOptions selector(NR_ELEMENTS(options3), options3, values);
|
||||
F("64x48"),
|
||||
F("72x40") };
|
||||
FormSelectorOptions selector(optionsSize, options3, values);
|
||||
selector.reloadonchange = reloadOnChange;
|
||||
selector.addFormSelector(
|
||||
F("Display Size"),
|
||||
@@ -128,4 +130,4 @@ bool OLedI2CAddressCheck(uint8_t function,
|
||||
}
|
||||
return success;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,7 @@ void OLedFormContrast(const __FlashStringHelper *id,
|
||||
void OLedFormSizes(const __FlashStringHelper *id,
|
||||
const int *values,
|
||||
uint8_t selectedIndex,
|
||||
uint8_t optionsSize = 3,
|
||||
bool reloadOnChange = false);
|
||||
void OLedSetContrast(OLEDDisplay *_display,
|
||||
const uint8_t& OLED_contrast);
|
||||
|
||||
@@ -173,6 +173,10 @@ constexpr tSizeSettings SizeSettings[] = {
|
||||
{ 64, 48, 32, // 64x48
|
||||
3, // max. line count
|
||||
32, 10 // WiFi indicator
|
||||
},
|
||||
{ 72, 40, 28, // 72x40
|
||||
3, // max. line count
|
||||
28, 12 // WiFi indicator
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1164,6 +1168,8 @@ tIndividualFontSettings P036_data_struct::CalculateIndividualFontSettings(uint8_
|
||||
break;
|
||||
case p036_resolution::pix128x32: lSpace = -2;
|
||||
break;
|
||||
case p036_resolution::pix72x40: lSpace = -1;
|
||||
break;
|
||||
case p036_resolution::pix64x48: lSpace = -1;
|
||||
break;
|
||||
}
|
||||
@@ -1310,6 +1316,8 @@ tFontSettings P036_data_struct::CalculateFontSettings(uint8_t lDefaultLines) {
|
||||
break;
|
||||
case p036_resolution::pix64x48: result.Space = -1;
|
||||
break;
|
||||
case p036_resolution::pix72x40: result.Space = -1;
|
||||
break;
|
||||
}
|
||||
iFontIndex = NR_ELEMENTS(FontSizes) - 1;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,8 @@ enum class eHeaderContent : uint8_t {
|
||||
enum class p036_resolution : uint8_t {
|
||||
pix128x64 = 0u,
|
||||
pix128x32 = 1u,
|
||||
pix64x48 = 2u
|
||||
pix64x48 = 2u,
|
||||
pix72x40 = 3u,
|
||||
};
|
||||
|
||||
enum class ePageScrollSpeed : uint8_t {
|
||||
|
||||
Reference in New Issue
Block a user