looptime_autodetect to uint16_t from float
@@ -34,6 +34,7 @@ typedef struct {
extern control_flags_t flags;
typedef struct {
+ uint16_t looptime_autodetect;
float looptime; // looptime in seconds
float uptime; // running sum of looptimes
float cpu_load; // micros we have had left last loop
@@ -75,10 +76,10 @@ typedef struct {
vec4_t motor_mix;
float angleerror[ANGLE_PID_SIZE];
- float looptime_autodetect;
} control_state_t;
#define STATE_MEMBERS \
+ MEMBER(looptime_autodetect, uint16) \
MEMBER(looptime, float) \
MEMBER(uptime, float) \
MEMBER(cpu_load, float) \
@@ -103,8 +104,7 @@ typedef struct {
MEMBER(setpoint, vec3_t) \
MEMBER(error, vec3_t) \
MEMBER(errorvect, vec3_t) \
- MEMBER(pidoutput, vec3_t) \
- MEMBER(looptime_autodetect, float)
+ MEMBER(pidoutput, vec3_t)
extern control_state_t state;
