1
0
forked from me/IronOS

Pass one settings refactor

This commit is contained in:
Ben V. Brown
2021-09-12 13:31:03 +10:00
parent fc47c71ec3
commit eb2a748e3f
10 changed files with 452 additions and 496 deletions

View File

@@ -40,7 +40,7 @@ bool ScrollMessage::drawUpdate(const char *message, uint32_t currentTick) {
int16_t messageOffset;
uint16_t msgWidth = messageWidth(message);
if (msgWidth > OLED_WIDTH) {
messageOffset = ((currentTick - messageStart) / (systemSettings.descriptionScrollSpeed == 1 ? TICKS_100MS / 10 : (TICKS_100MS / 5)));
messageOffset = ((currentTick - messageStart) / (getSettingValue(SettingsOptions::DescriptionScrollSpeed) == 1 ? TICKS_100MS / 10 : (TICKS_100MS / 5)));
messageOffset %= msgWidth + OLED_WIDTH; // Roll around at the end
if (messageOffset < OLED_WIDTH) {
// Snap the message to the left edge.