Date:2011-07-05 01:22:53 (8 years 2 months ago)
Author:Werner Almesberger
Commit:10f618ac608b219306f062a7e453ac14fbd3df39
Message:tools/atrf-rssi/gui.c (gui): accept keyboard input both from stdin and SDL

Files: tools/atrf-rssi/gui.c (3 diffs)

Change Details

tools/atrf-rssi/gui.c
2323#include "at86rf230.h"
2424#include "atrf.h"
2525#include "misctxrx.h"
26#include "getkey.h"
2627
2728#include "zgrid.h"
2829#include "digit.h"
...... 
262263    }
263264    atexit(SDL_Quit);
264265
266    get_key_init();
267
265268    surf = SDL_SetVideoMode(XRES, YRES, 0, SDL_SWSURFACE);
266269    if (!surf) {
267270        fprintf(stderr, "SDL_SetVideoMode: %s\n", SDL_GetError());
...... 
295298            }
296299        }
297300
301        switch (get_key()) {
302        case 'J':
303        case 'j':
304            wlan_area = area_jp;
305            break;
306        case 'E':
307        case 'e':
308            wlan_area = area_eu;
309            break;
310        case 'U':
311        case 'u':
312            wlan_area = area_us;
313            break;
314        case 'Q':
315        case 'q':
316            return;
317        default:
318            break;
319        }
320
298321        shift_grid(z, N_CHAN, N_TIME);
299322        sweep(dsc, z);
300323

Archive Download the corresponding diff file



interactive