Skip to content

Instantly share code, notes, and snippets.

View csete's full-sized avatar

Alexandru Csete csete

View GitHub Profile
@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 / 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 / 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