Stuff from text.h is now const.

This commit is contained in:
2019-06-06 06:42:00 +02:00
parent 540b188058
commit 26761226d0
4 changed files with 18 additions and 18 deletions

View File

@ -16,11 +16,11 @@ void BigClockEffect::drawText(char *text, int x, int y, CRGB color) {
}
}
unsigned char* BigClockEffect::font_char(unsigned char* font, char c) {
return &font[(c - 48) * 4];
const unsigned char* BigClockEffect::font_char(const unsigned char* font, char c) {
return font + (c - 48) * 4;
}
void BigClockEffect::drawSprite(unsigned char* sprite, int xOffset, int yOffset, CRGB color) {
void BigClockEffect::drawSprite(const unsigned char* sprite, int xOffset, int yOffset, CRGB color) {
for ( byte y = 0; y < 7; y++) {
for ( byte x = 0; x < 4; x++) {
bool on = (sprite[x] >> y & 1) * 255;