Update weather_sat.py

This commit is contained in:
Mitch Ross
2026-02-07 15:06:58 -05:00
parent 4d24e648ab
commit b87623cf66

View File

@@ -297,7 +297,7 @@ class WeatherSatDecoder:
# Auto-detect serial by querying rtl_eeprom, fall back to string index.
source_id = self._resolve_device_id(device_index)
cmd = [
satdump_cmd = [
'satdump', 'live',
sat_info['pipeline'],
str(self._capture_output_dir),
@@ -308,6 +308,14 @@ class WeatherSatDecoder:
'--source_id', source_id,
]
# Wrap with stdbuf to disable output buffering.
# SatDump (C++) fully buffers stdout when writing to a pipe,
# which prevents our reader from seeing any output until exit.
if shutil.which('stdbuf'):
cmd = ['stdbuf', '-o0', '-e0'] + satdump_cmd
else:
cmd = satdump_cmd
if bias_t:
cmd.append('--bias')