This commit is contained in:
DashyFox 2023-09-27 23:43:55 +03:00
parent f432bc16be
commit eeda3b930f
3 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@ void setup() {
ring.begin(); ring.begin();
screen.begin(); screen.begin();
screen.drawBitmap(0, 0, DashyFox_logo, 128, 32); screen.adafruit->drawBitmap(0, 0, DashyFox_logo, 128, 32, WHITE);
screen.adafruit->display(); screen.adafruit->display();
} }

View File

@ -37,7 +37,7 @@ static const uint8_t DashyFox_logo [] PROGMEM = {
/* 32 */ 0b11111111, 0b11100000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000111, 0b11111111 /* 32 */ 0b11111111, 0b11100000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000111, 0b11111111
}; };
static uint8_t DashyFox_logo_point_1 [] = { static uint8_t DashyFox_logo_point_1 [6] = {
0x3f >> 1, 0xf0 ,0x7f >> 3, 0xf8, 0x3f >> 1, 0xf0 0x3f >> 1, 0xf0 ,0x7f >> 3, 0xf8, 0x3f >> 1, 0xf0
}; };
static uint8_t DashyFox_logo_point_2 [] = {0}; static uint8_t DashyFox_logo_point_2 [6] = {0};

View File

@ -47,8 +47,10 @@ public:
for (uint16_t iY = 1; iY <= sizeY; iY++) { for (uint16_t iY = 1; iY <= sizeY; iY++) {
for (uint16_t iX = 1; iX <= sizeX; iX++) { for (uint16_t iX = 1; iX <= sizeX; iX++) {
uint16_t local = iY * (sizeY - 1) + iX; uint16_t local = iY * (sizeY - 1) + iX;
uint16_t global = screen.height * (posY + iY - 1) + (posX + iX); uint16_t global = screen.height * (posY + iY - 1) + (posX + iX);
bool localPixel = (bitmap[local / 8] >> (7 - (local % 8))) & 1; bool localPixel = (bitmap[local / 8] >> (7 - (local % 8))) & 1;
bool globalPixel = (screenBuffer[global / 8] >> (7 - (global % 8))) & 1; bool globalPixel = (screenBuffer[global / 8] >> (7 - (global % 8))) & 1;