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;
40 void setNextTransitionDirection(int8_t thisDirection)
override;
41 void displayPopup(std::string_view newText, int8_t numFlashes = 3,
bool alignRight =
false, uint8_t drawDot = 255,
42 int32_t blinkSpeed = 1, PopupType type = PopupType::GENERAL)
override;
43 void freezeWithError(std::string_view)
override;
44 void cancelPopup()
override;
45 void displayError(Error error)
override;
47 void setTextAsNumber(int16_t number, uint8_t drawDot = 255,
bool doBlink =
false)
override;
48 void setTextAsSlot(int16_t currentSlot, int8_t currentSubSlot,
bool currentSlotExists,
bool doBlink =
false,
49 int32_t blinkPos = -1,
bool blinkImmediately =
false)
override;
50 void setTextWithMultipleDots(std::string_view newText, std::vector<uint8_t> dotPositions,
bool alignRight =
false,
51 bool doBlink =
false, uint8_t* newBlinkMask =
nullptr,
52 bool blinkImmediately =
false)
override;
54 void timerRoutine()
override;
55 void removeTopLayer();
57 int32_t initialDelay = 600,
int count = -1,
58 uint8_t fixedDot = 255)
override;
59 int32_t getEncodedPosFromLeft(int32_t text_position, std::string_view text,
bool* andAHalf)
override;
61 void displayLoadingAnimation(
bool delayed =
false,
bool transparent =
false);
62 bool isLayerCurrentlyOnTop(
NumericLayer* layer)
override;
63 std::array<uint8_t, kNumericDisplayLength> getLast()
override {
return lastDisplay_; }
65 bool hasPopup()
override {
return this->popupActive; }
66 bool hasPopupOfType(PopupType type)
override {
return this->popupActive && type == this->popupType; }
68 constexpr size_t getNumBrowserAndMenuLines()
override {
return 1; }
70 void consoleText(std::string_view text)
override { SevenSegment::displayPopup(text); }
71 void popupText(std::string_view text, PopupType type = PopupType::GENERAL)
override {
72 SevenSegment::displayPopup(text, 0,
false, 255, 1, type);
74 void popupTextTemporary(std::string_view text, PopupType type = PopupType::GENERAL)
override {
75 SevenSegment::displayPopup(text, 3,
false, 255, 1, type);
78 void removeWorkingAnimation()
override {}
81 void displayLoadingAnimationText(std::string_view text,
bool delayed =
false,
bool transparent =
false)
override {
82 SevenSegment::displayLoadingAnimation(delayed, transparent);
84 void removeLoadingAnimation()
override { SevenSegment::removeTopLayer(); }
86 void enableLowercase() { use_lowercase =
true; }
87 void disableLowercase() { use_lowercase =
false; }
92 int8_t nextTransitionDirection = 0;
93 bool popupActive =
false;
94 PopupType popupType = PopupType::NONE;
96 void deleteAllLayers();
98 void innerSetText(std::string_view newText,
bool alignRight =
false, std::vector<uint8_t> dotPositions = {},
99 bool doBlink =
false, uint8_t* newBlinkMask =
nullptr,
bool blinkImmediately =
false,
100 bool shouldBlinkFast =
false, int32_t scrollPos = 0, uint8_t* blinkAddition =
nullptr,
101 bool justReplaceBottomLayer =
false);
102 int32_t encodeText(std::string_view newText, uint8_t* destination,
bool alignRight,
103 const std::vector<uint8_t>& dotPositions = {},
bool limitToDisplayLength =
true,
104 int32_t scrollPos = 0)
const;
108 void setTextVeryBasicA1(std::string_view text);
109 std::array<uint8_t, kNumericDisplayLength> lastDisplay_ = {0};
110 bool use_lowercase =
false;
Definition numeric_layer_basic_text.h:22