1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

atrf-path: the GUI is now activated with -g; also changed arguments in GUI mode

- atrf-path.c (usage, main): new option -g to invoke the GUI
- atrf-path.c (usage, main): in GUI mode, the number of sweeps is optional
  (default: infinite)
- atrf-path.c (main), gui.h (gui), gui.c (gui): exit after the specified
  number of sweeps
This commit is contained in:
Werner Almesberger
2011-04-13 09:31:57 -03:00
parent cee0296579
commit 436c9faed5
3 changed files with 35 additions and 10 deletions

View File

@@ -109,7 +109,7 @@ static void tstop(void)
}
void gui(const struct sweep *sweep)
void gui(const struct sweep *sweep, int sweeps)
{
SDL_Surface *surf;
SDL_Event event;
@@ -127,7 +127,7 @@ void gui(const struct sweep *sweep)
exit(1);
}
while (1) {
while (cycle != sweeps || !sweeps) {
struct sample res[N_CHAN*2];
while (SDL_PollEvent(&event))