diff --git a/src/devices/nexa.c b/src/devices/nexa.c index d52fab6ba..2611c53c7 100644 --- a/src/devices/nexa.c +++ b/src/devices/nexa.c @@ -22,7 +22,7 @@ static int nexa_callback(r_device *decoder, bitbuffer_t *bitbuffer) { /* Reject codes of wrong length */ if (bitbuffer->bits_per_row[1] != 64 && bitbuffer->bits_per_row[1] != 72) - return 0; + return DECODE_ABORT_LENGTH; bitbuffer_t databits = {0}; @@ -30,7 +30,7 @@ static int nexa_callback(r_device *decoder, bitbuffer_t *bitbuffer) { /* Reject codes when Manchester decoding fails */ if (pos != 64 && pos != 72) - return 0; + return DECODE_ABORT_LENGTH; bitrow_t *bb = databits.bb; uint8_t *b = bb[0]; @@ -46,15 +46,15 @@ static int nexa_callback(r_device *decoder, bitbuffer_t *bitbuffer) { data = data_make( "model", "", DATA_STRING, _X("Nexa-Security","Nexa"), "id", "House Code", DATA_INT, sensor_id, - "group", "Group", DATA_INT, group_code, "channel", "Channel", DATA_INT, channel_code, "state", "State", DATA_STRING, on_bit ? "OFF" : "ON", "unit", "Unit", DATA_INT, unit_bit, + "group", "Group", DATA_INT, group_code, NULL); decoder_output_data(decoder, data); - return 0; + return 1; } static char *output_fields[] = { diff --git a/src/devices/proove.c b/src/devices/proove.c index 2ec0c903c..71f9189b6 100644 --- a/src/devices/proove.c +++ b/src/devices/proove.c @@ -39,14 +39,14 @@ static int proove_callback(r_device *decoder, bitbuffer_t *bitbuffer) { /* Reject codes of wrong length */ if (bitbuffer->bits_per_row[1] != 64) - return 0; + return DECODE_ABORT_LENGTH; bitbuffer_t databits = {0}; unsigned pos = bitbuffer_manchester_decode(bitbuffer, 1, 0, &databits, 64); /* Reject codes when Manchester decoding fails */ if (pos != 64) - return 0; + return DECODE_ABORT_LENGTH; bitrow_t *bb = databits.bb; uint8_t *b = bb[0]; @@ -70,7 +70,7 @@ static int proove_callback(r_device *decoder, bitbuffer_t *bitbuffer) { decoder_output_data(decoder, data); - return 0; + return 1; } static char *output_fields[] = {