@@ -11,7 +11,7 @@ class Screen_
1111private:
1212 Screen_ () = default ;
1313
14- uint8_t brightness_ = 255 ;
14+ uint8_t brightness_ = MAX_BRIGHTNESS ;
1515 uint8_t renderBuffer_[ROWS * COLS];
1616 uint8_t rotatedRenderBuffer_[ROWS * COLS];
1717 uint8_t positions[ROWS * COLS] = {
@@ -55,35 +55,48 @@ class Screen_
5555 void clear ();
5656 void clearRect (int x, int y, int width, int height);
5757
58- void setPixel (uint8_t x, uint8_t y, uint8_t value, uint8_t brightness = 255 );
59- void setPixelAtIndex (uint8_t index, uint8_t value, uint8_t brightness = 255 );
58+ void setPixel (uint8_t x, uint8_t y, uint8_t value, uint8_t brightness = MAX_BRIGHTNESS );
59+ void setPixelAtIndex (uint8_t index, uint8_t value, uint8_t brightness = MAX_BRIGHTNESS );
6060
6161 void setup ();
6262
6363 void loadFromStorage ();
6464 void persist ();
6565 uint8_t getBufferIndex (int index);
6666
67- void drawLine (int x1, int y1, int x2, int y2, int ledStatus, uint8_t brightness = 255 );
67+ void drawLine (int x1, int y1, int x2, int y2, int ledStatus, uint8_t brightness = MAX_BRIGHTNESS );
6868 void drawRectangle (int x,
6969 int y,
7070 int width,
7171 int height,
7272 bool fill,
7373 int ledStatus,
74- uint8_t brightness = 255 );
75- void drawCharacter (int x, int y, std::vector<int > bits, int bitCount, uint8_t brightness = 255 );
76- void drawNumbers (int x, int y, std::vector<int > numbers, uint8_t brightness = 255 );
77- void drawBigNumbers (int x, int y, std::vector<int > numbers, uint8_t brightness = 255 );
78- void drawWeather (int x, int y, int weather, uint8_t brightness = 255 );
79- std::vector<int > readBytes (std::vector<int > bytes);
74+ uint8_t brightness = MAX_BRIGHTNESS);
75+ void drawCharacter (int x,
76+ int y,
77+ const std::vector<int > &bits,
78+ int bitCount,
79+ uint8_t brightness = MAX_BRIGHTNESS);
80+ void drawNumbers (int x,
81+ int y,
82+ const std::vector<int > &numbers,
83+ uint8_t brightness = MAX_BRIGHTNESS);
84+ void drawBigNumbers (int x,
85+ int y,
86+ const std::vector<int > &numbers,
87+ uint8_t brightness = MAX_BRIGHTNESS);
88+ void drawWeather (int x, int y, int weather, uint8_t brightness = MAX_BRIGHTNESS);
89+ std::vector<int > readBytes (const std::vector<int > &bytes);
8090
81- void scrollText (std::string text, int delayTime = 30 , uint8_t brightness = 255 , uint8_t fontid = 0 );
82- void scrollGraph (std::vector<int > graph = {},
91+ void scrollText (const std::string &text,
92+ int delayTime = 30 ,
93+ uint8_t brightness = MAX_BRIGHTNESS,
94+ uint8_t fontid = 0 );
95+ void scrollGraph (const std::vector<int > &graph = {},
8396 int miny = 0 ,
8497 int maxy = 15 ,
8598 int delayTime = 60 ,
86- uint8_t brightness = 255 );
99+ uint8_t brightness = MAX_BRIGHTNESS );
87100};
88101
89102extern Screen_ &Screen;
0 commit comments