Make float_to_fixed_point a public function.
authorChristopher Peplin <chris.peplin@rhubarbtech.com>
Wed, 5 Mar 2014 20:39:52 +0000 (15:39 -0500)
committerChristopher Peplin <chris.peplin@rhubarbtech.com>
Wed, 5 Mar 2014 20:39:52 +0000 (15:39 -0500)
src/canutil/write.c
src/canutil/write.h

index 3b3ae25..7f3a3e0 100644 (file)
@@ -2,7 +2,7 @@
 #include <bitfield/bitfield.h>
 #include <bitfield/8byte.h>
 
-static uint64_t float_to_fixed_point(const float value, const float factor,
+uint64_t float_to_fixed_point(const float value, const float factor,
         const float offset) {
     float raw = (value - offset) / factor;
     if(raw > 0) {
index 28b7e05..c2bef20 100644 (file)
@@ -26,6 +26,9 @@ extern "C" {
 uint64_t eightbyte_encode_float(float value, uint8_t bit_offset,
         uint8_t bit_size, float factor, float offset);
 
+uint64_t float_to_fixed_point(const float value, const float factor,
+        const float offset);
+
 bool bitfield_encode_float(const float value, const uint8_t bit_offset,
         const uint8_t bit_size, const float factor, const float offset,
         uint8_t destination[], const uint8_t destination_length);