From 24fc387e656ccf9ada20371df22be8a26ebaf2f0 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 22 Jan 2016 10:37:03 +0000 Subject: [PATCH] elv: Fix precision of bit limits If we're going to describe the timings as 'XXX/4' then now it's a float we might as well use 'XXX/4.0'. This is a functional change (not that it causes any difference in results on the packet corpus), so goes in a separate commit. --- src/devices/elv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/devices/elv.c b/src/devices/elv.c index 77268b28..1653e840 100644 --- a/src/devices/elv.c +++ b/src/devices/elv.c @@ -131,9 +131,9 @@ static int ws2000_callback(bitbuffer_t *bitbuffer) { r_device elv_em1000 = { .name = "ELV EM 1000", .modulation = OOK_PULSE_PPM_RAW, - .short_limit = 750/4, - .long_limit = 7250/4, - .reset_limit = 30000/4, + .short_limit = 750/4.0, + .long_limit = 7250/4.0, + .reset_limit = 30000/4.0, .json_callback = &em1000_callback, .disabled = 0, .demod_arg = 0, @@ -142,9 +142,9 @@ r_device elv_em1000 = { r_device elv_ws2000 = { .name = "ELV WS 2000", .modulation = OOK_PULSE_PPM_RAW, - .short_limit = (602+(1155-602)/2)/4, - .long_limit = ((1755635-1655517)/2)/4, // no repetitions - .reset_limit = ((1755635-1655517)*2)/4, + .short_limit = (602+(1155-602)/2)/4.0, + .long_limit = ((1755635-1655517)/2)/4.0, // no repetitions + .reset_limit = ((1755635-1655517)*2)/4.0, .json_callback = &ws2000_callback, .disabled = 0, .demod_arg = 0,