mirror of
https://github.com/brmlab/ledbar.git
synced 2025-06-09 13:24:01 +02:00
Sleep at the beginning to give time for Arduino to settle
This commit is contained in:
parent
9d81a9d0e7
commit
9678a078b1
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define min(x,y) ( (x)<(y) ? (x) : (y) )
|
#define min(x,y) ( (x)<(y) ? (x) : (y) )
|
||||||
#define max(x,y) ( (x)>(y) ? (x) : (y) )
|
#define max(x,y) ( (x)>(y) ? (x) : (y) )
|
||||||
|
@ -283,6 +284,8 @@ int main(int argc, char* argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sleep(2);
|
||||||
|
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) return 1;
|
if (SDL_Init(SDL_INIT_VIDEO) < 0) return 1;
|
||||||
if (!(screen = SDL_SetVideoMode(RESX, RESY, BPP, SDL_HWSURFACE))) {
|
if (!(screen = SDL_SetVideoMode(RESX, RESY, BPP, SDL_HWSURFACE))) {
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue