diff --git a/sw/airborne/subsystems/ins/hf_float.c b/sw/airborne/subsystems/ins/hf_float.c index 9f817cc3e0..5d6c4350d3 100644 --- a/sw/airborne/subsystems/ins/hf_float.c +++ b/sw/airborne/subsystems/ins/hf_float.c @@ -193,10 +193,10 @@ static int b2_hff_rb_n; ///< ringbuffer fill count /** by how many steps the estimated GPS validity point in time differed from GPS_LAG_N */ -static int lag_counter_err; +static int16_t lag_counter_err; /** counts down the propagation steps until the filter state is saved again */ -static int save_counter; +static int16_t save_counter; static int past_save_counter; #define SAVE_NOW 0 #define SAVING -1 diff --git a/sw/airborne/subsystems/ins/hf_float.h b/sw/airborne/subsystems/ins/hf_float.h index 7d6e43eab7..8491178f63 100644 --- a/sw/airborne/subsystems/ins/hf_float.h +++ b/sw/airborne/subsystems/ins/hf_float.h @@ -46,7 +46,7 @@ struct HfilterFloat { float ydotdot; float xP[HFF_STATE_SIZE][HFF_STATE_SIZE]; float yP[HFF_STATE_SIZE][HFF_STATE_SIZE]; - uint8_t lag_counter; + uint16_t lag_counter; bool rollback; };