Use only 1 byte for the alarms.
This commit is contained in:
parent
56c2893758
commit
a5cabb5550
@ -282,6 +282,7 @@ uwatec_smart_parser_samples_foreach (parser_t *abstract, sample_callback_t callb
|
|||||||
double depth = 0, depth_calibration = 0;
|
double depth = 0, depth_calibration = 0;
|
||||||
double temperature = 0;
|
double temperature = 0;
|
||||||
double pressure = 0;
|
double pressure = 0;
|
||||||
|
unsigned char alarms = 0;
|
||||||
|
|
||||||
unsigned int offset = header;
|
unsigned int offset = header;
|
||||||
while (offset < size) {
|
while (offset < size) {
|
||||||
@ -360,9 +361,10 @@ uwatec_smart_parser_samples_foreach (parser_t *abstract, sample_callback_t callb
|
|||||||
time += 4;
|
time += 4;
|
||||||
break;
|
break;
|
||||||
case ALARMS:
|
case ALARMS:
|
||||||
|
alarms = value;
|
||||||
sample.vendor.type = SAMPLE_VENDOR_UWATEC_SMART;
|
sample.vendor.type = SAMPLE_VENDOR_UWATEC_SMART;
|
||||||
sample.vendor.size = sizeof (value);
|
sample.vendor.size = sizeof (alarms);
|
||||||
sample.vendor.data = &value;
|
sample.vendor.data = &alarms;
|
||||||
if (callback) callback (SAMPLE_TYPE_VENDOR, sample, userdata);
|
if (callback) callback (SAMPLE_TYPE_VENDOR, sample, userdata);
|
||||||
break;
|
break;
|
||||||
case TIME:
|
case TIME:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user