svn commit: r245237 - user/adrian/ath_radar_stuff/src/spectral_fft

Adrian Chadd adrian at FreeBSD.org
Wed Jan 9 20:13:48 UTC 2013


Author: adrian
Date: Wed Jan  9 20:13:47 2013
New Revision: 245237
URL: http://svnweb.freebsd.org/changeset/base/245237

Log:
  * break out the width/height/scaling to fft_display.h
  * modify acceleration max to 40, rather than 20, so I can quickly scroll
    around the 5ghz range
  * change the scroll to be left/right, rather than pageup/pagedown.

Modified:
  user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.c
  user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.h
  user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c

Modified: user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.c
==============================================================================
--- user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.c	Wed Jan  9 20:10:45 2013	(r245236)
+++ user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.c	Wed Jan  9 20:13:47 2013	(r245237)
@@ -36,6 +36,10 @@
 
 #include "fft_eval.h"
 
+/*
+ * This is needed for fft_histogram, which currently
+ * manipulates fft_radar_entry structs.
+ */
 #if 1
 #include "net80211/ieee80211.h"
 #include "net80211/ieee80211_radiotap.h"
@@ -50,13 +54,6 @@
 
 #include "fft_display.h"
 
-#define WIDTH	1600
-#define HEIGHT	650
-#define BPP	32
-
-#define X_SCALE	5
-#define Y_SCALE	4
-
 #define	RMASK 	0x000000ff
 #define RBITS	0
 #define	GMASK	0x0000ff00

Modified: user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.h
==============================================================================
--- user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.h	Wed Jan  9 20:10:45 2013	(r245236)
+++ user/adrian/ath_radar_stuff/src/spectral_fft/fft_display.h	Wed Jan  9 20:13:47 2013	(r245237)
@@ -1,6 +1,13 @@
 #ifndef	__FFT_DISPLAY_H__
 #define	__FFT_DISPLAY_H__
 
+#define	WIDTH	1600
+#define	HEIGHT	650
+#define	BPP	32
+
+#define	X_SCALE	5
+#define	Y_SCALE	4
+
 struct fft_display {
 	SDL_Surface *screen;
 	TTF_Font *font;

Modified: user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c
==============================================================================
--- user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c	Wed Jan  9 20:10:45 2013	(r245236)
+++ user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c	Wed Jan  9 20:13:47 2013	(r245237)
@@ -49,21 +49,6 @@
 #include "fft_histogram.h"
 #include "fft_display.h"
 
-#define WIDTH	1600
-#define HEIGHT	650
-#define BPP	32
-
-#define X_SCALE	5
-#define Y_SCALE	4
-
-#define	RMASK 	0x000000ff
-#define RBITS	0
-#define	GMASK	0x0000ff00
-#define GBITS	8
-#define	BMASK	0x00ff0000
-#define	BBITS	16
-#define	AMASK	0xff000000
-
 /* XXX ew globals */
 pthread_mutex_t mtx_histogram;
 int g_do_update = 0;
@@ -188,11 +173,11 @@ void graphics_main(struct fft_display *f
 				}
 				break;
 #endif
-			case SDLK_PAGEUP:
+			case SDLK_LEFT:
 				accel-= 2;
 				scroll = 1;
 				break;
-			case SDLK_PAGEDOWN:
+			case SDLK_RIGHT:
 				accel+= 2;
 				scroll = 1;
 				break;
@@ -217,8 +202,8 @@ void graphics_main(struct fft_display *f
 		}
 		if (startfreq < 2300)		startfreq = 2300;
 		if (startfreq > 6000)		startfreq = 6000;
-		if (accel < -20)		accel = -20;
-		if (accel >  20)		accel = 20;
+		if (accel < -40)		accel = -40;
+		if (accel >  40)		accel = 40;
 	}
 }
 


More information about the svn-src-user mailing list