Analyze the time it takes to perform the calculation and the size of the generated binary (it will probably be smaller).
If it is not too slow even without a FPU, remove the table and use math's log().
Log time with:
void sys_tick_handler(void)
{
+ float tcompute;
+
clock_tick();
+ stopwatch_start();
update_distance_readings();
+ tcompute = stopwatch_stop();
update_gyro_readings();
update_encoder_readings();
motor_control();
- log_data();
+ LOG_DATA("[%f]", tcompute);
}
Analyze the time it takes to perform the calculation and the size of the generated binary (it will probably be smaller).
If it is not too slow even without a FPU, remove the table and use math's
log().Log time with:
void sys_tick_handler(void) { + float tcompute; + clock_tick(); + stopwatch_start(); update_distance_readings(); + tcompute = stopwatch_stop(); update_gyro_readings(); update_encoder_readings(); motor_control(); - log_data(); + LOG_DATA("[%f]", tcompute); }