From 512336b68da052f167bdfb8f2b9a9992ed3f1688 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 27 Apr 2017 00:44:17 +0200 Subject: Don't use heavy weapon to get some basic calculation Change-Id: Ibc820dea7efbc2d7a50671ce66804217c6707d56 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/can/can-bus-dev.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'CAN-binder/low-can-binding') diff --git a/CAN-binder/low-can-binding/can/can-bus-dev.cpp b/CAN-binder/low-can-binding/can/can-bus-dev.cpp index 4737d113..7f7a7624 100644 --- a/CAN-binder/low-can-binding/can/can-bus-dev.cpp +++ b/CAN-binder/low-can-binding/can/can-bus-dev.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include "can-bus.hpp" #include "can-message.hpp" @@ -132,7 +131,7 @@ int can_bus_dev_t::create_rx_filter(const can_signal_t& s) memset(&cfd, 0, sizeof(cfd)); memset(&bcm_msg.msg_head, 0, sizeof(bcm_msg.msg_head)); uint8_t bit_size = s.get_bit_size(); - float val = (float)exp2(bit_size)-1; + float val = (float)(1 << bit_size)-1; bcm_msg.msg_head.opcode = RX_SETUP; bcm_msg.msg_head.can_id = can_id; -- cgit 1.2.3-korg