advanced lock
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#include <screenmanager.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "displays/statusdisplay.h"
|
||||
#include "displays/menus/boardcomputerhardwaresettingsmenu.h"
|
||||
|
||||
@ -241,6 +242,12 @@ void CalibrateDisplay::back()
|
||||
case Status::Begin:
|
||||
if (m_bootup)
|
||||
espgui::switchScreen<StatusDisplay>();
|
||||
else if (settings.lockscreen.keepLockedAfterReboot && settings.lockscreen.locked)
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
settings.lockscreen.locked = false;
|
||||
saveSettings();
|
||||
}
|
||||
else
|
||||
espgui::switchScreen<BoardcomputerHardwareSettingsMenu>();
|
||||
break;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "texts.h"
|
||||
#include "buttons.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "displays/calibratedisplay.h"
|
||||
|
||||
void Lockscreen::start()
|
||||
{
|
||||
@ -78,7 +79,10 @@ void Lockscreen::redraw()
|
||||
{
|
||||
if (m_numbers == settings.lockscreen.pin)
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
if (!gas || !brems || *gas > 200.f || *brems > 200.f)
|
||||
espgui::switchScreen<CalibrateDisplay>(true);
|
||||
else
|
||||
espgui::switchScreen<MainMenu>();
|
||||
#ifdef LOCKSCREEN_PLUGIN
|
||||
#pragma message "Activating Lockscreen Plugin"
|
||||
#include LOCKSCREEN_PLUGIN
|
||||
@ -135,10 +139,13 @@ void Lockscreen::stop()
|
||||
|
||||
profileButtonDisabled = false;
|
||||
isLocked = false;
|
||||
if (settings.lockscreen.keepLockedAfterReboot && settings.lockscreen.locked)
|
||||
if (!(!gas || !brems || *gas > 200.f || *brems > 200.f))
|
||||
{
|
||||
settings.lockscreen.locked = false;
|
||||
saveSettings();
|
||||
if (settings.lockscreen.keepLockedAfterReboot && settings.lockscreen.locked)
|
||||
{
|
||||
settings.lockscreen.locked = false;
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,14 +234,14 @@ extern "C" void app_main()
|
||||
switchScreen<DPad6WireDebugDisplay>();
|
||||
#else
|
||||
|
||||
if (!gas || !brems || *gas > 200.f || *brems > 200.f)
|
||||
espgui::switchScreen<CalibrateDisplay>(true);
|
||||
if (settings.lockscreen.keepLockedAfterReboot && settings.lockscreen.locked)
|
||||
{
|
||||
espgui::switchScreen<Lockscreen>();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings.lockscreen.keepLockedAfterReboot && settings.lockscreen.locked)
|
||||
{
|
||||
espgui::switchScreen<Lockscreen>();
|
||||
}
|
||||
if (!gas || !brems || *gas > 200.f || *brems > 200.f)
|
||||
espgui::switchScreen<CalibrateDisplay>(true);
|
||||
else
|
||||
{
|
||||
espgui::switchScreen<StatusDisplay>();
|
||||
|
Reference in New Issue
Block a user