mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-04-10 04:49:16 +02:00
removing soft start for now and gitignore
This commit is contained in:
parent
4899ffcbaa
commit
9b2bbc754a
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,3 +21,5 @@ test/build/*
|
||||
html_doc/
|
||||
|
||||
components/components/*
|
||||
config.bin
|
||||
config.cvs
|
@ -22,7 +22,7 @@ static GlobalState GLOBAL_STATE = {
|
||||
.version_mask = 0,
|
||||
.POWER_MANAGEMENT_MODULE = {
|
||||
.frequency_multiplier = 1,
|
||||
.frequency_value = 50
|
||||
.frequency_value = BM1397_FREQUENCY
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user