~aleteoryx/muditaos

6cc2bc9df4ed70d5548f7f4296be4062553b5c7a — Dawid Wojtas 2 years ago 72f01e4
[BH-1830] Fix eink crash while refreshing

If the previous refresh failed the driver tried to add a new frame
in the front of the vector. In some cases, the updateFrames could
be empty, and adding a frame caused a system crash.
2 files changed, 2 insertions(+), 1 deletions(-)

M harmony_changelog.md
M module-services/service-eink/ServiceEink.cpp
M harmony_changelog.md => harmony_changelog.md +1 -0
@@ 6,6 6,7 @@
* Fixed eink errors in logs
* Fixed alarm when the onboarding is in progress
* Fixed relaxation start delay when trying to play MP3 files with large metadata
* Fixed eink crash while refreshing

### Added
* Added shortcuts instruction to settings

M module-services/service-eink/ServiceEink.cpp => module-services/service-eink/ServiceEink.cpp +1 -1
@@ 343,7 343,7 @@ namespace service::eink
                previousContext->insert(0, 0, ctx);
            }
        }
        if (previousRefreshStatus == RefreshStatus::Failed) {
        if ((previousRefreshStatus == RefreshStatus::Failed) && !updateFrames.empty()) {
            updateFrames.front() = {0, 0, BOARD_EINK_DISPLAY_RES_X, BOARD_EINK_DISPLAY_RES_Y};
        }