diff --git a/examples/sigrok-conv.sh b/examples/sigrok-conv.sh index 1981f285..070edac9 100755 --- a/examples/sigrok-conv.sh +++ b/examples/sigrok-conv.sh @@ -37,7 +37,7 @@ if [ ! -z "$4" ] ; then fi # create channels -rtl_433 -q -s ${rate}k -r "$file" -w F32:I:analog-1-4-1 -w F32:Q:analog-1-5-1 -w F32:AM:analog-1-6-1 -w F32:FM:analog-1-7-1 -w U8:LOGIC:logic-1-1 >/dev/null 2>&1 +rtl_433 -s ${rate}k -r "$file" -w F32:I:analog-1-4-1 -w F32:Q:analog-1-5-1 -w F32:AM:analog-1-6-1 -w F32:FM:analog-1-7-1 -w U8:LOGIC:logic-1-1 >/dev/null 2>&1 # create version tag echo -n "2" >version # create meta data diff --git a/examples/sigrok-open.sh b/examples/sigrok-open.sh index 5fc9d467..6a10dfed 100755 --- a/examples/sigrok-open.sh +++ b/examples/sigrok-open.sh @@ -30,7 +30,7 @@ if [ ! -z "$3" ] ; then fi # create channels -rtl_433 -q -s ${rate}k -r "$file" -w F32:I:analog-1-4-1 -w F32:Q:analog-1-5-1 -w F32:AM:analog-1-6-1 -w F32:FM:analog-1-7-1 -w U8:LOGIC:logic-1-1 >/dev/null 2>&1 +rtl_433 -s ${rate}k -r "$file" -w F32:I:analog-1-4-1 -w F32:Q:analog-1-5-1 -w F32:AM:analog-1-6-1 -w F32:FM:analog-1-7-1 -w U8:LOGIC:logic-1-1 >/dev/null 2>&1 # create version tag echo -n "2" >version # create meta data diff --git a/src/rtl_433.c b/src/rtl_433.c index d03dc73e..b7c46d0a 100644 --- a/src/rtl_433.c +++ b/src/rtl_433.c @@ -1359,8 +1359,12 @@ int main(int argc, char **argv) { || demod->load_info.format == S16_AM || demod->load_info.format == S16_FM) { demod->sample_size = sizeof(uint8_t); // CU8, AM, FM - } else { + } else if (demod->load_info.format == CS16_IQ + || demod->load_info.format == CF32_IQ) { demod->sample_size = sizeof(int16_t); // CF32, CS16 + } else { + fprintf(stderr, "Input format invalid: %s\n", file_info_string(&demod->load_info)); + break; } if (cfg->verbosity) { fprintf(stderr, "Input format: %s\n", file_info_string(&demod->load_info));