Compare commits

..

No commits in common. "c32b7c7cb6a955f7228a910006b454a8069b0976" and "3664355b1ad8d0084af4aff9f5993e78c2be72ea" have entirely different histories.

2 changed files with 17 additions and 2 deletions

View File

@ -198,7 +198,21 @@ int CrossPointSettings::getRefreshFrequency() const {
}
}
unsigned long CrossPointSettings::getLongPressDurationMs() const { return 2000UL; }
unsigned long CrossPointSettings::getLongPressDurationMs() const {
switch (longPressDuration) {
case LONG_PRESS_DURATION::LP_1S:
return 1UL * 1000;
case LONG_PRESS_DURATION::LP_2S:
default:
return 2UL * 1000;
case LONG_PRESS_DURATION::LP_3S:
return 3UL * 1000;
case LONG_PRESS_DURATION::LP_5S:
return 5UL * 1000;
case LONG_PRESS_DURATION::LP_10S:
return 10UL * 1000;
}
}
int CrossPointSettings::getReaderFontId() const {
switch (fontFamily) {

View File

@ -35,13 +35,14 @@ const SettingInfo readerSettings[readerSettingsCount] = {
SettingInfo::Toggle("Extra Paragraph Spacing", &CrossPointSettings::extraParagraphSpacing),
SettingInfo::Toggle("Text Anti-Aliasing", &CrossPointSettings::textAntiAliasing)};
constexpr int controlsSettingsCount = 4;
constexpr int controlsSettingsCount = 5;
const SettingInfo controlsSettings[controlsSettingsCount] = {
SettingInfo::Enum("Front Button Layout", &CrossPointSettings::frontButtonLayout,
{"Bck, Cnfrm, Lft, Rght", "Lft, Rght, Bck, Cnfrm", "Lft, Bck, Cnfrm, Rght"}),
SettingInfo::Enum("Side Button Layout (reader)", &CrossPointSettings::sideButtonLayout,
{"Prev, Next", "Next, Prev"}),
SettingInfo::Toggle("Long-press Chapter Skip", &CrossPointSettings::longPressChapterSkip),
SettingInfo::Enum("Long-press Duration", &CrossPointSettings::longPressDuration, {"1s", "2s", "3s", "5s", "10s"}),
SettingInfo::Enum("Short Power Button Click", &CrossPointSettings::shortPwrBtn, {"Ignore", "Sleep", "Page Turn"})};
constexpr int systemSettingsCount = 5;