Skip to content
Open
Show file tree
Hide file tree
Changes from 14 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
5 changes: 3 additions & 2 deletions src/_P036_FrameOLED.ino
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,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);
Expand Down
9 changes: 5 additions & 4 deletions src/src/Helpers/OLed_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +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);
selector.reloadonchange = reloadOnChange;
F("64x48"),
F("72x40") };
FormSelectorOptions selector(optionsSize, options3, values); selector.reloadonchange = reloadOnChange;
Comment thread
andbad marked this conversation as resolved.
Outdated
selector.addFormSelector(
F("Display Size"),
id,
Expand Down Expand Up @@ -128,4 +129,4 @@ bool OLedI2CAddressCheck(uint8_t function,
}
return success;
}
#endif
#endif
1 change: 1 addition & 0 deletions src/src/Helpers/OLed_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions src/src/PluginStructs/P036_data_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
};

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/src/PluginStructs/P036_data_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ enum class eHeaderContent : uint8_t {
enum class p036_resolution : uint8_t {
pix128x64 = 0u,
pix128x32 = 1u,
pix64x48 = 2u
Comment thread
TD-er marked this conversation as resolved.
pix64x48 = 2u,
pix72x40 = 3u,
};

enum class ePageScrollSpeed : uint8_t {
Expand Down