summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-07-24 23:10:01 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-07-24 23:10:01 +0200
commit47501b582b51396cac7dc15a646e017f4e91e822 (patch)
tree6b9313081074320dc26bef16352151f3b64e5c2c /src
parent59bc0f747a042e971a3de1224d223d944962cde2 (diff)
downloadufodecode-47501b582b51396cac7dc15a646e017f4e91e822.tar.gz
ufodecode-47501b582b51396cac7dc15a646e017f4e91e822.tar.bz2
ufodecode-47501b582b51396cac7dc15a646e017f4e91e822.tar.xz
ufodecode-47501b582b51396cac7dc15a646e017f4e91e822.zip
Read output_mode and adc_resolution from frame header
Diffstat (limited to 'src')
-rw-r--r--src/ufodecode.c4
-rw-r--r--src/ufodecode.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ufodecode.c b/src/ufodecode.c
index 43085d7..68b0da7 100644
--- a/src/ufodecode.c
+++ b/src/ufodecode.c
@@ -561,8 +561,10 @@ size_t ufo_decoder_decode_frame(UfoDecoder *decoder,
pos++;
meta->frame_number = raw[pos++] & 0x1FFFFFF;
- CHECK_VALUE(raw[pos] >> 24, 0x50);
+ CHECK_VALUE(raw[pos] >> 28, 0x5);
meta->time_stamp = raw[pos++] & 0xFFFFFF;
+ meta->output_mode = (raw[pos] >> 24) & 0x3;
+ meta->adc_resolution = (raw[pos] >> 26) & 0x3
break;
default:
diff --git a/src/ufodecode.h b/src/ufodecode.h
index 7c2f098..228bec3 100644
--- a/src/ufodecode.h
+++ b/src/ufodecode.h
@@ -45,6 +45,9 @@ typedef struct {
uint32_t n_rows;
uint8_t n_skipped_rows;
uint16_t cmosis_start_address;
+ uint8_t output_mode;
+ uint8_t adc_resolution;
+
union {
uint32_t bits;
UfoDecoderStatus1 desc;