- fixes a bug in text lengths calculations with spaces
- adds the onscreen menu option to disable or enable internal apps

Many options are moved from webinterface to onscreen menu the last few versions. if you running awtrix light for some versions now, it could be necessary to delete your config.json and restart in order to cleanup your webinterface.

closes #14
This commit is contained in:
Stephan Mühl
2023-03-26 01:59:04 +01:00
parent a4ffeb7da6
commit e66713fd28
17 changed files with 2725 additions and 2705 deletions

View File

@@ -185,38 +185,42 @@ int8_t MatrixDisplayUi::update()
void MatrixDisplayUi::tick()
{
this->state.ticksSinceLastStateSwitch++;
switch (this->state.frameState)
{
case IN_TRANSITION:
if (this->state.ticksSinceLastStateSwitch >= this->ticksPerTransition)
{
this->state.frameState = FIXED;
this->state.currentFrame = getnextAppNumber();
this->state.ticksSinceLastStateSwitch = 0;
this->nextAppNumber = -1;
}
break;
case FIXED:
// Revert manuelControll
if (this->state.manuelControll)
{
this->state.frameTransitionDirection = this->lastTransitionDirection;
this->state.manuelControll = false;
}
if (this->state.ticksSinceLastStateSwitch >= this->ticksPerFrame)
{
if (this->setAutoTransition)
{
this->state.frameState = IN_TRANSITION;
if (this->AppCount > 0)
{
switch (this->state.frameState)
{
case IN_TRANSITION:
if (this->state.ticksSinceLastStateSwitch >= this->ticksPerTransition)
{
this->state.frameState = FIXED;
this->state.currentFrame = getnextAppNumber();
this->state.ticksSinceLastStateSwitch = 0;
this->nextAppNumber = -1;
}
this->state.ticksSinceLastStateSwitch = 0;
break;
case FIXED:
// Revert manuelControll
if (this->state.manuelControll)
{
this->state.frameTransitionDirection = this->lastTransitionDirection;
this->state.manuelControll = false;
}
if (this->state.ticksSinceLastStateSwitch >= this->ticksPerFrame)
{
if (this->setAutoTransition)
{
this->state.frameState = IN_TRANSITION;
}
this->state.ticksSinceLastStateSwitch = 0;
}
break;
}
break;
}
this->matrix->clear();
this->drawApp();
if (this->AppCount > 0)
this->drawApp();
this->drawOverlays();
this->matrix->show();
}