Skip to content
Snippets Groups Projects
Commit 82744353 authored by Fabrice Weinberg's avatar Fabrice Weinberg
Browse files

Make it possible to enable/disable all indicators

parent daa91a67
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,14 @@ void OLEDDisplayUi::disableIndicator(){ ...@@ -76,6 +76,14 @@ void OLEDDisplayUi::disableIndicator(){
this->state.isIndicatorDrawen = false; this->state.isIndicatorDrawen = false;
} }
void OLEDDisplayUi::enableAllIndicators(){
this->shouldDrawIndicators = true;
}
void OLEDDisplayUi::disableAllIndicators(){
this->shouldDrawIndicators = false;
}
void OLEDDisplayUi::setIndicatorPosition(IndicatorPosition pos) { void OLEDDisplayUi::setIndicatorPosition(IndicatorPosition pos) {
this->indicatorPosition = pos; this->indicatorPosition = pos;
} }
...@@ -220,7 +228,9 @@ void OLEDDisplayUi::tick() { ...@@ -220,7 +228,9 @@ void OLEDDisplayUi::tick() {
this->display->clear(); this->display->clear();
this->drawFrame(); this->drawFrame();
this->drawIndicator(); if (shouldDrawIndicators) {
this->drawIndicator();
}
this->drawOverlays(); this->drawOverlays();
this->display->display(); this->display->display();
} }
......
...@@ -81,7 +81,7 @@ struct OLEDDisplayUiState { ...@@ -81,7 +81,7 @@ struct OLEDDisplayUiState {
bool isIndicatorDrawen = true; bool isIndicatorDrawen = true;
// Normal = 1, Inverse = -1; // Normal = 1, Inverse = -1;
int8_t frameTransitionDirection = 1; int8_t frameTransitionDirection = 1;
bool manuelControll = false; bool manuelControll = false;
...@@ -109,6 +109,8 @@ class OLEDDisplayUi { ...@@ -109,6 +109,8 @@ class OLEDDisplayUi {
const char* activeSymbol = ANIMATION_activeSymbol; const char* activeSymbol = ANIMATION_activeSymbol;
const char* inactiveSymbol = ANIMATION_inactiveSymbol; const char* inactiveSymbol = ANIMATION_inactiveSymbol;
bool shouldDrawIndicators = true;
// Values for the Frames // Values for the Frames
AnimationDirection frameAnimationDirection = SLIDE_RIGHT; AnimationDirection frameAnimationDirection = SLIDE_RIGHT;
...@@ -215,6 +217,16 @@ class OLEDDisplayUi { ...@@ -215,6 +217,16 @@ class OLEDDisplayUi {
*/ */
void disableIndicator(); void disableIndicator();
/**
* Enable drawing of indicators
*/
void enableAllIndicator();
/**
* Disable draw of indicators.
*/
void disableAllIndicator();
/** /**
* Set the position of the indicator bar. * Set the position of the indicator bar.
*/ */
......
...@@ -273,6 +273,16 @@ void enableIndicator(); ...@@ -273,6 +273,16 @@ void enableIndicator();
*/ */
void disableIndicator(); void disableIndicator();
/**
* Enable drawing of indicators
*/
void enableAllIndicator();
/**
* Disable drawing of indicators.
*/
void disableAllIndicator();
/** /**
* Set the position of the indicator bar. * Set the position of the indicator bar.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment