File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,14 @@ void OLEDDisplayUi::disableIndicator(){
7676 this ->state .isIndicatorDrawen = false ;
7777}
7878
79+ void OLEDDisplayUi::enableAllIndicators (){
80+ this ->shouldDrawIndicators = true ;
81+ }
82+
83+ void OLEDDisplayUi::disableAllIndicators (){
84+ this ->shouldDrawIndicators = false ;
85+ }
86+
7987void OLEDDisplayUi::setIndicatorPosition (IndicatorPosition pos) {
8088 this ->indicatorPosition = pos;
8189}
@@ -220,7 +228,9 @@ void OLEDDisplayUi::tick() {
220228
221229 this ->display ->clear ();
222230 this ->drawFrame ();
223- this ->drawIndicator ();
231+ if (shouldDrawIndicators) {
232+ this ->drawIndicator ();
233+ }
224234 this ->drawOverlays ();
225235 this ->display ->display ();
226236}
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ struct OLEDDisplayUiState {
8181 bool isIndicatorDrawen = true ;
8282
8383 // Normal = 1, Inverse = -1;
84- int8_t frameTransitionDirection = 1 ;
84+ int8_t frameTransitionDirection = 1 ;
8585
8686 bool manuelControll = false ;
8787
@@ -109,6 +109,8 @@ class OLEDDisplayUi {
109109 const char * activeSymbol = ANIMATION_activeSymbol;
110110 const char * inactiveSymbol = ANIMATION_inactiveSymbol;
111111
112+ bool shouldDrawIndicators = true ;
113+
112114 // Values for the Frames
113115 AnimationDirection frameAnimationDirection = SLIDE_RIGHT;
114116
@@ -215,6 +217,16 @@ class OLEDDisplayUi {
215217 */
216218 void disableIndicator ();
217219
220+ /* *
221+ * Enable drawing of indicators
222+ */
223+ void enableAllIndicators ();
224+
225+ /* *
226+ * Disable draw of indicators.
227+ */
228+ void disableAllIndicators ();
229+
218230 /* *
219231 * Set the position of the indicator bar.
220232 */
Original file line number Diff line number Diff line change @@ -273,6 +273,16 @@ void enableIndicator();
273273 */
274274void disableIndicator();
275275
276+ /**
277+ * Enable drawing of indicators
278+ */
279+ void enableAllIndicator();
280+
281+ /**
282+ * Disable drawing of indicators.
283+ */
284+ void disableAllIndicator();
285+
276286/**
277287 * Set the position of the indicator bar.
278288 */
You can’t perform that action at this time.
0 commit comments