status now always reports position

This commit is contained in:
2019-07-29 22:03:22 +03:00
parent 4d15c1e5ff
commit f1c26251f6
14 changed files with 211 additions and 117 deletions

17
Firmware/common/Util.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef UTIL_H
#define UTIL_H
#include <Arduino.h>
constexpr int i2cFloatSize{4};
inline void bytesToFloat(float *target, byte *val) {
memcpy(target, val, i2cFloatSize);
return;
}
inline void floatToBytes(byte *target, float val) {
memcpy(target, &val, i2cFloatSize);
return;
}
#endif