- ao_config_get();
- (void) pos;
-// ao_log_current_pos = pos * ao_config.flight_log_max;
-// ao_log_end_pos = ao_log_current_pos + ao_config.flight_log_max;
-// if (ao_log_end_pos > ao_storage_config)
-// return;
-
- ao_log_current_pos = 0;
- ao_log_end_pos = ao_storage_config;
-
- while (ao_log_current_pos < ao_log_end_pos) {
- ao_storage_erase(ao_log_current_pos);
- ao_log_current_pos += ao_storage_block;
- }
+ return (uint8_t) (ao_storage_config / ao_config.flight_log_max);
+}
+
+static uint32_t
+ao_log_pos(uint8_t slot)
+{
+ return ((slot) * ao_config.flight_log_max);