Ondřej Hruška 2 years ago
parent 80d5635e95
commit 14c9ca1971
  1. 4
      framebuffer_config.h
  2. 8
      main.c

@ -2,7 +2,7 @@
#define FRAMEBUFFER_CONFIG_H #define FRAMEBUFFER_CONFIG_H
/* Tiny framebuffer */ /* Tiny framebuffer */
#define FBW 128 #define FBW 140
#define FBH 32 #define FBH 40
#endif /* FRAMEBUFFER_CONFIG_H */ #endif /* FRAMEBUFFER_CONFIG_H */

@ -75,7 +75,7 @@ void main() {
// fb_bitmap(ZIR_W+2, 12, ZIR_W, ZIR_H, zirafa, 1); // fb_bitmap(ZIR_W+2, 12, ZIR_W, ZIR_H, zirafa, 1);
// fb_bitmap((ZIR_W + 2) * 2, 2, ZIR_W, ZIR_H, zirafa, 1); // fb_bitmap((ZIR_W + 2) * 2, 2, ZIR_W, ZIR_H, zirafa, 1);
fb_frame(0, 0, 128, 32, 2, 1); fb_frame(0, 0, 140, 40, 2, 1);
uint8_t x = 3; uint8_t x = 3;
uint8_t w = 7; uint8_t w = 7;
@ -94,7 +94,9 @@ void main() {
//fb_invert(); //fb_invert();
fb_text(3, 15, "Ahoj→! 43.15 μSv/h", 0, 1); fb_text(40, 12, "▶Ahoj→!", FONT_BOLD, 1);
fb_text(3, 20, "43.15 μSv/h", FONT_DOUBLE, 1);
fb_text(36, 5, "-123456789.0 CPM°", FONT_TINY, 1); fb_text(36, 5, "-123456789.0 CPM°", FONT_TINY, 1);
// struct Utf8Iterator iter; // struct Utf8Iterator iter;
@ -139,7 +141,7 @@ void fb_blit() {
for(int x = 0; x < FBW; x++) { for(int x = 0; x < FBW; x++) {
bool b = fb[(y/8)*FBW + x] & (1 << (y%8)); bool b = fb[(y/8)*FBW + x] & (1 << (y%8));
if (b) { if (b) {
printf("\x1b[1;32m#\x1b[m"); printf("\x1b[1;32m\x1b[m");
} else { } else {
if (y%8 == 0) { if (y%8 == 0) {
printf("\x1b[34m.\x1b[m"); printf("\x1b[34m.\x1b[m");

Loading…
Cancel
Save