Skip to content

Instantly share code, notes, and snippets.

View csete's full-sized avatar

Alexandru Csete csete

View GitHub Profile
@csete
csete / gr-audio-alsa.diff
Created November 5, 2010 13:15
OBSOLETE. Fix "audio_alsa_sink[hw:0,0]: snd_pcm_hw_params failed: File descriptor in bad state".
diff --git a/gr-audio-alsa/src/audio_alsa_sink.cc b/gr-audio-alsa/src/audio_alsa_sink.cc
index d6b7f84..38ed86b 100644
--- a/gr-audio-alsa/src/audio_alsa_sink.cc
+++ b/gr-audio-alsa/src/audio_alsa_sink.cc
@@ -219,9 +219,15 @@ audio_alsa_sink::check_topology (int ninputs, int noutputs)
int nchan = ninputs;
int err;
- // FIXME check_topology may be called more than once.
+ // Check the state of the stream
@csete
csete / gr-qtgui.diff
Created November 8, 2010 23:24
Some mods to make the height of Qt GUI sink smaller to better fit on laptop screens
diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot.cc b/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
index d150e2e..bd67d90 100644
--- a/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
+++ b/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
@@ -5,6 +5,8 @@
#include <qwt_scale_draw.h>
+#include <qwt_plot_grid.h>
+
@csete
csete / gist:813836
Created February 6, 2011 23:46
Arduino code to read TMP102 temp sensor and MPX4115A pressure sensor.
/* The setup for this code:
http://www.oz9aec.net/index.php/arduino/343-mpx4115a-pressure-sensor-with-arduino
*/
#include <LiquidCrystal.h>
#include <Wire.h>
#define kpa2atm 0.00986923267
// initialize the LCD library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
@csete
csete / quisk_conf_fcd.py
Created February 22, 2011 16:42
Quisk configuration file for Funcube Dongle
# Custom quisk_conf.py configuration file for Funcube Dongle.
# See quisk_conf_defaults.py for more information.
# In ALSA, soundcards have these names. The "hw" devices are the raw
# hardware devices, and should be used for soundcard capture.
#name_of_sound_capt = "hw:0"
#name_of_sound_capt = "hw:1"
#name_of_sound_capt = "plughw"
#name_of_sound_capt = "plughw:1"
#name_of_sound_capt = "default"
@csete
csete / quisk.py
Created February 22, 2011 16:44
Modified Quisk 3.5.1 to follow desktop theme instead of ugly custom colors
#! /usr/bin/python
# All QUISK software is Copyright (C) 2006-2010 by James C. Ahlstrom.
# This free software is licensed for use under the GNU General Public
# License (GPL), see http://www.opensource.org.
# Note that there is NO WARRANTY AT ALL. USE AT YOUR OWN RISK!!
"""The main program for Quisk, a software defined radio.
Usage: python quisk.py [-c | --config config_file_path]
@csete
csete / gr-fcd-osx.patch
Created July 31, 2011 18:59
Patch to make gr-fcd compile on Mac OS X (native)
diff --git a/configure.ac b/configure.ac
index 27c0dc1..26974c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,9 +44,9 @@ m4_include([config/gr_standalone.m4])
GR_STANDALONE
dnl Check for libusb-1.0
-PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0)
-LIBS="$LIBS $LIBUSB_LIBS"
@csete
csete / rtl_apt_rx.grc
Created April 7, 2012 16:39
APT FM receiver using the RTL2832 source
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Fri Apr 6 11:11:01 2012</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
<value>fcd_apt_rx</value>
</param>
<param>
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Tue Apr 10 20:21:22 2012</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
<value>rtl_nfm_rx</value>
</param>
<param>
@csete
csete / quisk_conf_fcdpp.py
Created November 21, 2012 10:02
Quisk configuration file for the Funcube Dongle Pro+
# Custom quisk_conf.py configuration file for Funcube Dongle Pro+.
# See quisk_conf_defaults.py for more information.
# In ALSA, soundcards have these names. The "hw" devices are the raw
# hardware devices, and should be used for soundcard capture.
#name_of_sound_capt = "hw:0"
#name_of_sound_capt = "hw:1"
#name_of_sound_capt = "plughw"
#name_of_sound_capt = "plughw:1"
#name_of_sound_capt = "default"
@csete
csete / iq_swap.cpp
Last active December 14, 2015 01:48
/** I/Q swap **/
iq_swap_cc_sptr make_iq_swap_cc(bool enabled)
{
return gnuradio::get_initial_sptr(new iq_swap_cc(enabled));
}
iq_swap_cc::iq_swap_cc(bool enabled)
: gr_hier_block2 ("iq_swap_cc",
gr_make_io_signature(1, 1, sizeof(gr_complex)),
gr_make_io_signature(1, 1, sizeof(gr_complex)))