mirror of
https://github.com/merbanan/rtl_433.git
synced 2026-04-22 02:26:59 -04:00
Add more input format validation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user