Skip to content

Commit

Permalink
added examples for DUMPCSV
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpete committed Oct 6, 2013
1 parent 48f1e24 commit 9d9b142
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 11 deletions.
2 changes: 1 addition & 1 deletion demod_dumpcsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static void dumpcsv_demod(struct demod_state *s, buffer_t buffer, int length)
/* ---------------------------------------------------------------------- */

const struct demod_param demod_dumpcsv = {
"DUMP", false, SAMPLING_RATE, 0, dumpcsv_init, dumpcsv_demod, NULL
"DUMPCSV", false, SAMPLING_RATE, 0, dumpcsv_init, dumpcsv_demod, NULL
};


Expand Down
15 changes: 15 additions & 0 deletions example/README-dumpcsv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@



To generate a png from a wav file

generate a .csv file from the data :

multimon-ng -q -t wav -a DUMPCSV x10rf.wav > x10rf.csv

use gnuplot to generate a PNG of the data

gnuplot -e "plot_data_file='x10rf'" dumpcsv_png.txt

there should be a file named x10rf.png

22 changes: 22 additions & 0 deletions example/dumpcsv_png.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set terminal png size 2600,500
#set terminal png size 1920,500
#set terminal png size 800,150
set datafile separator ","
set xlabel "Time (ms)"
set ylabel "Arbitrary Power (dB?)"
set grid
#show mxtics
set xtics 0.5 rotate
set mxtics 10
set key off
set pointsize 0.5

name=plot_data_file

set title name." multimon-ng dump"
# name=system("echo $plot_data_file")

set output name.".png"

plot name.".csv" using 1:2 with linespoints pt 6 lc 3

Binary file added example/x10rf.wav
Binary file not shown.
11 changes: 1 addition & 10 deletions multimon.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,6 @@ struct demod_state {
uint32_t current_sequence;
} dumpcsv;

struct l1_state_x10 {
uint32_t current_sequence;
uint32_t last_rise;
short current_state;
short current_phase;
char b[4];
char bi;
char bstring[42];
} x10;


#ifndef NO_X11
Expand Down Expand Up @@ -306,7 +297,7 @@ extern const struct demod_param demod_scope;
#define ALL_DEMOD &demod_poc5, &demod_poc12, &demod_poc24, &demod_eas, &demod_ufsk1200, &demod_clipfsk, \
&demod_afsk1200, &demod_afsk2400, &demod_afsk2400_2, &demod_afsk2400_3, &demod_hapn4800, \
&demod_fsk9600, &demod_dtmf, &demod_zvei1, &demod_zvei2, &demod_zvei3, &demod_dzvei, \
&demod_pzvei, &demod_eea, &demod_eia, &demod_ccir, &demod_morse, &demod_dumpcsv, &demod_x10 SCOPE_DEMOD
&demod_pzvei, &demod_eea, &demod_eia, &demod_ccir, &demod_morse, &demod_dumpcsv SCOPE_DEMOD


/* ---------------------------------------------------------------------- */
Expand Down

0 comments on commit 9d9b142

Please sign in to comment.