2020-01-31 09:36:36 +00:00
|
|
|
#include "./manual.h"
|
2020-02-02 11:19:24 +00:00
|
|
|
#include "./home.h"
|
|
|
|
#include "./move.h"
|
|
|
|
#include "include/metrics.h"
|
|
|
|
#include "lib/settings.h"
|
|
|
|
#include "../state.h"
|
2020-01-31 09:36:36 +00:00
|
|
|
|
|
|
|
|
2020-02-02 11:19:24 +00:00
|
|
|
|
|
|
|
void ManualScreen::initHeights()
|
2020-01-31 09:36:36 +00:00
|
|
|
{
|
2020-02-02 11:19:24 +00:00
|
|
|
this->height = Control.getCurrentHeight();
|
2020-01-31 09:36:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-02-02 11:19:24 +00:00
|
|
|
bool ManualScreen::nextPage()
|
2020-01-31 09:36:36 +00:00
|
|
|
{
|
2020-02-02 11:19:24 +00:00
|
|
|
if (this->height == Control.getCurrentHeight())
|
|
|
|
{
|
|
|
|
this->screenManager->show<HomeScreen>();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
MoveReturnScreen = this->screenId();
|
|
|
|
Control.moveStart(this->height);
|
|
|
|
|
|
|
|
this->screenManager->show<MoveScreen>();
|
|
|
|
return true;
|
2020-01-31 09:36:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-02-02 11:19:24 +00:00
|
|
|
|
|
|
|
void ManualScreen::setHeight(uint16_t value)
|
2020-01-31 09:36:36 +00:00
|
|
|
{
|
2020-02-02 11:19:24 +00:00
|
|
|
if (value < Settings.Height.Minimum)
|
|
|
|
this->height = Settings.Height.Minimum;
|
|
|
|
else if (value > Settings.Height.Maximum)
|
|
|
|
this->height = Settings.Height.Maximum;
|
|
|
|
else
|
|
|
|
this->height = value;
|
2020-01-31 09:36:36 +00:00
|
|
|
}
|