~aleteoryx/muditaos

1984c7f479314610fd98ad069717f4f4383424a2 — Mateusz Szczesny 2 years ago 7dc758b
[BH-1705] Fixed back button power off timer to 10s

When holding the back button, the device would prompt to
power off after 5s. This was not inline with the manual. Now
the prompt will come up after 10s which is correct by the
manual. In the code, the actual time is set to 9s because
an additional 1s delay is caused by the OS and screen
refresh rate.
M harmony_changelog.md => harmony_changelog.md +1 -0
@@ 20,6 20,7 @@
* Fixed problem with deleting files during Relaxation session.
* Fixed occasional crash on system startup.
* Fixed occasional USB crash when USB cable was disconnected during files upload
* Fixed back button power off timer changed to 10s 

### Added


M products/BellHybrid/services/evtmgr/internal/key_sequences/PowerOffSequence.hpp => products/BellHybrid/services/evtmgr/internal/key_sequences/PowerOffSequence.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 11,6 11,6 @@ class PowerOffSequence : public GenericLongPressSequence<KeyMap::Back>
  public:
    explicit PowerOffSequence(sys::Service &service)
        : GenericLongPressSequence<KeyMap::Back>{sys::TimerFactory::createSingleShotTimer(
              &service, "poffseq", std::chrono::milliseconds{5000}, [this](auto &) { handleTimer(); })}
              &service, "poffseq", std::chrono::milliseconds{9000}, [this](auto &) { handleTimer(); })}
    {}
};