disable expansion and reset some flags for release builds

there is no expansion modules yet, so we can disable uart listen for them being enabled 24/7
p.s. some parts of code was taken from Willy-JL's solution
todo: revert force reset part if there are real use cases for expansion protocol appears
This commit is contained in:
MX
2024-01-27 19:05:52 +03:00
parent 1ceacc6555
commit cbc0231461
5 changed files with 19 additions and 12 deletions

View File

@@ -395,9 +395,8 @@ void expansion_on_system_start(void* arg) {
furi_record_create(RECORD_EXPANSION, instance);
ExpansionSettings settings = {};
if(!expansion_settings_load(&settings)) {
expansion_settings_save(&settings);
} else if(settings.uart_index < FuriHalSerialIdMax) {
expansion_settings_load(&settings);
if(settings.uart_index < FuriHalSerialIdMax) {
expansion_enable(instance, settings.uart_index);
}
}