Re: [PATCH 1/2] android/bluetooth: Add threashold to RSSI change flat view From: Marcel Holtmann <marcel@holtmann.org> Date: 2014-01-29 01:02:50 Hi Anderson, quotedquoted+{ + int delta; + + if (old > new) + delta = old - new; + else + delta = new - old; + + /* only 8 dBm or more */ + return delta >= 8; int delta = old > new ? old - new : new - old; And why not: int delta = abs(old - new); (unless there is no abs() in bionic) I remember that abs() needs -lm or something stupid. Regards Marcel
Keyboard shortcuts hback out one level jnext message in thread kprevious message in thread ldrill in Escclose help / fold thread tree ?toggle this help