31class SevenSegment :
public Display {
33 SevenSegment() : Display(DisplayType::SEVENSEG) { l10n::chosenLanguage = &l10n::built_in::seven_segment; }
35 void setText(std::string_view newText,
bool alignRight =
false, uint8_t drawDot = 255,
bool doBlink =
false,
36 uint8_t* newBlinkMask =
nullptr,
bool blinkImmediately =
false,
bool shouldBlinkFast =
false,
37 int32_t scrollPos = 0, uint8_t* blinkAddition =
nullptr,
bool justReplaceBottomLayer =
false)
override;
39 void setNextTransitionDirection(int8_t thisDirection)
override;
40 void displayPopup(
char const* 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(
char const* text)
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 setTextWithMultipleDots(std::string_view newText, std::vector<uint8_t> dotPositions,
bool alignRight =
false,
50 bool doBlink =
false, uint8_t* newBlinkMask =
nullptr,
51 bool blinkImmediately =
false)
override;
53 void timerRoutine()
override;
54 void removeTopLayer();
56 int count = -1, uint8_t fixedDot = 255)
override;
57 int32_t getEncodedPosFromLeft(int32_t textPos,
char const* text,
bool* andAHalf)
override;
59 void displayLoadingAnimation(
bool delayed =
false,
bool transparent =
false);
60 bool isLayerCurrentlyOnTop(
NumericLayer* layer)
override;
61 std::array<uint8_t, kNumericDisplayLength> getLast()
override {
return lastDisplay_; }
63 bool hasPopup()
override {
return this->popupActive; }
64 bool hasPopupOfType(PopupType type)
override {
return this->popupActive && type == this->popupType; }
66 constexpr size_t getNumBrowserAndMenuLines()
override {
return 1; }
68 void consoleText(
char const* text)
override { SevenSegment::displayPopup(text); }
69 void popupText(
char const* text, PopupType type = PopupType::GENERAL)
override {
70 SevenSegment::displayPopup(text, 0,
false, 255, 1, type);
72 void popupTextTemporary(
char const* text, PopupType type = PopupType::GENERAL)
override {
73 SevenSegment::displayPopup(text, 3,
false, 255, 1, type);
76 void removeWorkingAnimation()
override {}
79 void displayLoadingAnimationText(
char const* text,
bool delayed =
false,
bool transparent =
false)
override {
80 SevenSegment::displayLoadingAnimation(delayed, transparent);
82 void removeLoadingAnimation()
override { SevenSegment::removeTopLayer(); }
84 void enableLowercase() { use_lowercase =
true; }
85 void disableLowercase() { use_lowercase =
false; }
90 int8_t nextTransitionDirection = 0;
91 bool popupActive =
false;
92 PopupType popupType = PopupType::NONE;
94 void deleteAllLayers();
96 void innerSetText(std::string_view newText,
bool alignRight =
false, std::vector<uint8_t> dotPositions = {},
97 bool doBlink =
false, uint8_t* newBlinkMask =
nullptr,
bool blinkImmediately =
false,
98 bool shouldBlinkFast =
false, int32_t scrollPos = 0, uint8_t* blinkAddition =
nullptr,
99 bool justReplaceBottomLayer =
false);
100 int32_t encodeText(std::string_view newText, uint8_t* destination,
bool alignRight,
101 const std::vector<uint8_t>& dotPositions = {},
bool limitToDisplayLength =
true,
102 int32_t scrollPos = 0)
const;
106 void setTextVeryBasicA1(
char const* text);
107 std::array<uint8_t, kNumericDisplayLength> lastDisplay_ = {0};
108 bool use_lowercase =
false;
Definition numeric_layer_basic_text.h:22