Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
plaber committed Jun 26, 2022
1 parent 9913556 commit c5418ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
11 changes: 2 additions & 9 deletions sub_bmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ char *cords;

static int px;
static bool framed = false;
static bool gct = false;
extern bool gct;

void bmp_setpx(int x, int y, int frm, int line)
{
Expand Down Expand Up @@ -241,14 +241,6 @@ void bmp_draw_mask(String path, unsigned long tm)
if (path.endsWith(exgif))
{
gifheader g = gif_load(path, true);
if (g.cdp)
{
gct = true;
}
else
{
gct = false;
}
fps = g.fps;
if (fps > 1)
{
Expand Down Expand Up @@ -344,6 +336,7 @@ void bmp_draw_last(int fps)
}
led_show();
udp_poll();
delay(10);
}

void bmp_init()
Expand Down
3 changes: 3 additions & 0 deletions sub_gif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ static int pofs;
static uint8_t block[256];
static uint16_t bt, bi, lzb, lz, last;
static uint32_t mil;
bool gct = false;

static void freeall()
{
Expand Down Expand Up @@ -165,10 +166,12 @@ struct gifheader gif_load(String path, bool ld)
if (ans.flag & 0b10000000) //global color table
{
ans.cdp = ans.flag & 0b111;
gct = true;
}
else
{
ans.cdp = 0;
gct = false;
}
if (ld == false) goto exitreadgif;
freeall();
Expand Down
12 changes: 6 additions & 6 deletions sub_led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ void led_init()

void led_blinkudp()
{
strip0->ClearTo(red);
strip2->ClearTo(orange);
if (strip4 != NULL) strip4->ClearTo(yellow);
strip0->ClearTo(red); strip0->SetPixelColor(0, green);
strip2->ClearTo(red); for(int i = 0; i <= 2; i++) strip2->SetPixelColor(i, green);
if (strip4 != NULL){ strip4->ClearTo(red); for(int i = 0; i <= 4; i++) strip4->SetPixelColor(i, green);}

strip1->ClearTo(blue);
strip3->ClearTo(wblue);
if (strip5 != NULL) strip5->ClearTo(cyan);
strip1->ClearTo(blue); for(int i = 0; i <= 1; i++) strip1->SetPixelColor(i, green);
strip3->ClearTo(blue); for(int i = 0; i <= 3; i++) strip3->SetPixelColor(i, green);
if (strip5 != NULL){ strip5->ClearTo(blue); for(int i = 0; i <= 5; i++) strip5->SetPixelColor(i, green);}

led_show();
}
Expand Down

0 comments on commit c5418ba

Please sign in to comment.