summaryrefslogtreecommitdiff
path: root/patches/rtlsdr-flarm-android.diff
blob: 65ee3a092e053cf9308d1005c373f831f8acd0e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- /dev/null	2014-09-01 14:32:42.899820178 +0200
+++ rtlsdr-flarm-0.1.2/Makefile.android	2014-09-15 01:07:11.454813894 +0200
@@ -0,0 +1,24 @@
+VERSION = 0.1.2
+
+CXX=../toolchain/arm-linux-androideabi/bin/g++
+FLAGS = -O2 -DRTLSDR_FLARM_VERSION=$(VERSION) -I../toolchain/include  -D__MACH__
+FLAGS += -Wall
+FLAGS += -g
+
+rtlsdr-flarm-android: rtlsdr-flarm-android.o
+	$(CXX) -o $@ $< \
+		../toolchain/lib/librtlsdr.a ../toolchain/lib/libfftw3.a ../toolchain/lib/libfftw3f.a \
+		../toolchain/lib/libusb-1.0.a ../toolchain/lib/libjpeg.a ../toolchain/lib/libconfig.a
+
+rtlsdr-flarm-android.o: rtlsdr-flarm.cc rtlsdr.h thread.h fft.h buffer.h image.h aircraft.h flarmframe.h flarmdemod.h sysmon.h
+	$(CXX) $(FLAGS) -c rtlsdr-flarm.cc -o $@
+
+debug:
+	adb push rtlsdr-flarm-android /system/vendor/bin/
+	adb push Example.conf /system/vendor/bin/rtlsdr-flarm.conf
+	adb shell chmod 777 /system/vendor/bin/rtlsdr-flarm-android
+	adb shell gdbserver 0.0.0.0:5000 /system/vendor/bin/rtlsdr-flarm-android /system/vendor/bin/rtlsdr-flarm.conf
+
+
+clean:
+	rm -vf rtlsdr-flarm-android.o rtlsdr-flarm-android
--- rtlsdr-flarm-0.1.2-orig/fft.h	2014-09-15 01:09:18.339443081 +0200
+++ rtlsdr-flarm-0.1.2/fft.h	2014-09-15 01:04:38.710056473 +0200
@@ -32,7 +32,7 @@
   { if( (Size==this->Size) && (Sign==this->Sign) ) return Size;
     Free();
     Buffer = (std::complex<Float> *)fftw_malloc(Size*sizeof(std::complex<Float>)); if(Buffer==0) return -1;
-    Plan = fftw_plan_dft_1d(Size, (fftw_complex *)Buffer, (fftw_complex *)Buffer, Sign, FFTW_MEASURE);
+    Plan = fftw_plan_dft_1d(Size, (fftw_complex *)Buffer, (fftw_complex *)Buffer, Sign, FFTW_ESTIMATE);
     this->Size=Size; this->Sign=Sign; return Size; }
 
   int PresetForward(int Size) { return Preset(Size, FFTW_FORWARD); }
@@ -74,7 +74,7 @@
   { if( (Size==this->Size) && (Sign==this->Sign) ) return Size;
     Free();
     Buffer = (std::complex<float> *)fftwf_malloc(Size*sizeof(std::complex<float>)); if(Buffer==0) return -1;
-    Plan = fftwf_plan_dft_1d(Size, (fftwf_complex *)Buffer, (fftwf_complex *)Buffer, Sign, FFTW_MEASURE);
+    Plan = fftwf_plan_dft_1d(Size, (fftwf_complex *)Buffer, (fftwf_complex *)Buffer, Sign, FFTW_ESTIMATE);
     this->Size=Size; this->Sign=Sign; return Size; }
 
   int PresetForward(int Size) { return Preset(Size, FFTW_FORWARD); }