diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2013-12-29 11:55:35 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2013-12-29 12:00:52 -0500 |
commit | c2c7ef1dfe4cae6b5831ffab0ce5780b27e0c25e (patch) | |
tree | d490768ad2effe746406c60419aae905cfeead83 /src/canutil/read.c | |
parent | 6ce03a4f1b229e605da08b073fad6f7c0fe8bf10 (diff) |
Standardize on snake_case naming as this is a C library.
Diffstat (limited to 'src/canutil/read.c')
-rw-r--r-- | src/canutil/read.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 <bitfield/bitfield.h> -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; } |