From c2c7ef1dfe4cae6b5831ffab0ce5780b27e0c25e Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 29 Dec 2013 11:55:35 -0500 Subject: Standardize on snake_case naming as this is a C library. --- src/canutil/read.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/canutil/read.c') diff --git a/src/canutil/read.c b/src/canutil/read.c index 6b4e40aa..5e882c3d 100644 --- a/src/canutil/read.c +++ b/src/canutil/read.c @@ -1,14 +1,14 @@ #include -float parseFloat(uint64_t data, uint8_t bitPosition, uint8_t bitSize, +float bitfield_parse_float(uint64_t data, uint8_t bit_offset, uint8_t bit_size, float factor, float offset) { - uint64_t rawValue = getBitField(data, bitPosition, - bitSize, true); - return rawValue * factor + offset; + uint64_t raw = get_bit_field(data, bit_offset, + bit_size, true); + return raw * factor + offset; } -bool parseBoolean(uint64_t data, uint8_t bitPosition, uint8_t bitSize, +bool bitfield_parse_bool(uint64_t data, uint8_t bit_offset, uint8_t bit_size, float factor, float offset) { - float value = parseFloat(data, bitPosition, bitSize, factor, offset); + float value = bitfield_parse_float(data, bit_offset, bit_size, factor, offset); return value == 0.0 ? false : true; } -- cgit 1.2.3-korg