removing soft start for now and gitignore

This commit is contained in:
Ben 2023-06-18 21:40:30 -04:00 committed by johnny9
parent 4899ffcbaa
commit 9b2bbc754a
3 changed files with 5 additions and 13 deletions

2
.gitignore vendored
View File

@ -21,3 +21,5 @@ test/build/*
html_doc/
components/components/*
config.bin
config.cvs

View File

@ -22,7 +22,7 @@ static GlobalState GLOBAL_STATE = {
.version_mask = 0,
.POWER_MANAGEMENT_MODULE = {
.frequency_multiplier = 1,
.frequency_value = 50
.frequency_value = BM1397_FREQUENCY
}
};

View File

@ -87,18 +87,8 @@ void POWER_MANAGEMENT_task(void * pvParameters){
// chip is coming back from a low/no voltage event
if(power_management->frequency_value < 50 && target_frequency > 50){
// The chip could have reset to the default baud OR not
// if chip is not default baud, set to default
int baud = BM1397_set_default_baud();
// then set esp32 baud to default
SERIAL_set_baud(baud);
// init the chip
BM1397_init(target_frequency);
// set asic and esp32 to max baud again
baud = BM1397_set_max_baud();
SERIAL_set_baud(baud);
power_management->frequency_value = target_frequency;
// TODO recover gracefully?
exit(1);
}