X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fcore%2Fao_config.c;h=ec2b61f6b7c1367549a0601c766e9d5380607c85;hp=0c10e60894e57569d18a07d870610717da95c1cb;hb=f145be3fc4ee94fdb5c1e2406b6c11d38bdbbd9b;hpb=859ee0268b9f2e1f5933019f1231d857a1cac4da diff --git a/src/core/ao_config.c b/src/core/ao_config.c index 0c10e608..ec2b61f6 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -47,7 +47,9 @@ _ao_config_put(void) ao_storage_setup(); ao_storage_erase(ao_storage_config); ao_storage_write(ao_storage_config, &ao_config, sizeof (ao_config)); +#if HAS_FLIGHT ao_log_write_erase(0); +#endif ao_storage_flush(); } @@ -301,7 +303,7 @@ ao_config_radio_cal_set(void) __reentrant _ao_config_edit_finish(); } -#if HAS_EEPROM +#if HAS_EEPROM && HAS_FLIGHT void ao_config_log_show(void) __reentrant { @@ -329,7 +331,7 @@ ao_config_log_set(void) __reentrant _ao_config_edit_finish(); } } -#endif /* HAS_EEPROM */ +#endif /* HAS_EEPROM && HAS_FLIGHT */ #if HAS_IGNITE void @@ -448,7 +450,7 @@ __code struct ao_config_var ao_config_vars[] = { #endif /* HAS_ACCEL */ { "f \0Radio calib (cal = rf/(xtal/2^16))", ao_config_radio_cal_set, ao_config_radio_cal_show }, -#if HAS_EEPROM +#if HAS_EEPROM && HAS_FLIGHT { "l \0Flight log size in kB", ao_config_log_set, ao_config_log_show }, #endif