32class SevenSegment :
public Display {
34 SevenSegment() : Display(DisplayType::SEVENSEG) { l10n::chosenLanguage = &l10n::built_in::seven_segment; }
36 void setText(std::string_view newText,
bool alignRight =
false, uint8_t drawDot = 255,
bool doBlink =
false,
37 uint8_t* newBlinkMask =
nullptr,
bool blinkImmediately =
false,
bool shouldBlinkFast =
false,
38 int32_t scrollPos = 0, uint8_t* blinkAddition =
nullptr,
bool justReplaceBottomLayer =
false)
override;
39 void setNextTransitionDirection(int8_t thisDirection)
override;
40 void displayPopup(std::string_view newText, int8_t numFlashes = 3,
bool alignRight =
false, uint8_t drawDot = 255,
41 int32_t blinkSpeed = 1, PopupType type = PopupType::GENERAL)
override;
42 void freezeWithError(std::string_view)
override;
43 void cancelPopup()
override;
44 void displayError(Error error)
override;
46 void setTextAsNumber(int16_t number, uint8_t drawDot = 255,
bool doBlink =
false)
override;
47 void setTextAsSlot(int16_t currentSlot, int8_t currentSubSlot,
bool currentSlotExists,
bool doBlink =
false,
48 int32_t blinkPos = -1,
bool blinkImmediately =
false)
override;
49 void timerRoutine()
override;
50 void removeTopLayer();
52 int32_t initialDelay = 600,
int count = -1,
53 uint8_t fixedDot = 255)
override;
54 int32_t getEncodedPosFromLeft(int32_t text_position, std::string_view text,
bool* andAHalf)
override;
56 void displayLoadingAnimation(
bool delayed =
false,
bool transparent =
false);
57 bool isLayerCurrentlyOnTop(
NumericLayer* layer)
override;
58 std::array<uint8_t, kNumericDisplayLength> getLast()
override {
return lastDisplay_; }
60 bool hasPopup()
override {
return this->popupActive; }
61 bool hasPopupOfType(PopupType type)
override {
return this->popupActive && type == this->popupType; }
63 constexpr size_t getNumBrowserAndMenuLines()
override {
return 1; }
65 void consoleText(std::string_view text)
override { SevenSegment::displayPopup(text); }
66 void popupText(std::string_view text, PopupType type = PopupType::GENERAL)
override {
67 SevenSegment::displayPopup(text, 0,
false, 255, 1, type);
69 void popupTextTemporary(std::string_view text, PopupType type = PopupType::GENERAL)
override {
70 SevenSegment::displayPopup(text, 3,
false, 255, 1, type);
73 void removeWorkingAnimation()
override {}
76 void displayLoadingAnimationText(std::string_view text,
bool delayed =
false,
bool transparent =
false)
override {
77 SevenSegment::displayLoadingAnimation(delayed, transparent);
79 void removeLoadingAnimation()
override { SevenSegment::removeTopLayer(); }
81 void enableLowercase() { use_lowercase =
true; }
82 void disableLowercase() { use_lowercase =
false; }
87 int8_t nextTransitionDirection = 0;
88 bool popupActive =
false;
89 PopupType popupType = PopupType::NONE;
91 void deleteAllLayers();
93 int32_t encodeText(std::string_view newText, uint8_t* destination,
bool alignRight, uint8_t drawDot = 255,
94 bool limitToDisplayLength =
true, int32_t scrollPos = 0);
98 void setTextVeryBasicA1(std::string_view text);
99 std::array<uint8_t, kNumericDisplayLength> lastDisplay_ = {0};
100 bool use_lowercase =
false;
Definition numeric_layer_basic_text.h:22