mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-29 11:11:45 +01:00
no need to introuce new NVS parameters, they can be derived from the device_model !
This commit is contained in:
parent
17852f03c5
commit
5e305ba6c7
@ -10,8 +10,6 @@ stratumpass,data,string,x
|
||||
asicfrequency,data,u16,490
|
||||
asicvoltage,data,u16,1166
|
||||
asicmodel,data,string,BM1368
|
||||
asiccount,data,u16,1
|
||||
voltagedomain,data,u16,1
|
||||
devicemodel,data,string,supra
|
||||
boardversion,data,string,401
|
||||
flipscreen,data,u16,1
|
||||
|
@ -10,8 +10,6 @@ stratumpass,data,string,x
|
||||
asicfrequency,data,u16,485
|
||||
asicvoltage,data,u16,1200
|
||||
asicmodel,data,string,BM1366
|
||||
asiccount,data,u16,1
|
||||
voltagedomain,data,u16,1
|
||||
devicemodel,data,string,ultra
|
||||
boardversion,data,string,204
|
||||
flipscreen,data,u16,1
|
||||
|
12
main/main.c
12
main/main.c
@ -28,22 +28,22 @@ void app_main(void)
|
||||
GLOBAL_STATE.POWER_MANAGEMENT_MODULE.frequency_value = nvs_config_get_u16(NVS_CONFIG_ASIC_FREQ, CONFIG_ASIC_FREQUENCY);
|
||||
ESP_LOGI(TAG, "NVS_CONFIG_ASIC_FREQ %f", (float)GLOBAL_STATE.POWER_MANAGEMENT_MODULE.frequency_value);
|
||||
|
||||
GLOBAL_STATE.asic_count = nvs_config_get_u16(NVS_CONFIG_ASIC_COUNT, 1);
|
||||
ESP_LOGI(TAG, "NVS_CONFIG_ASIC_COUNT %f", (float)GLOBAL_STATE.asic_count);
|
||||
|
||||
GLOBAL_STATE.voltage_domain = nvs_config_get_u16(NVS_CONFIG_VOLTAGE_DOMAIN, 1);
|
||||
ESP_LOGI(TAG, "NVS_CONFIG_VOLTAGE_DOMAIN %f", (float)GLOBAL_STATE.voltage_domain);
|
||||
|
||||
GLOBAL_STATE.device_model_str = nvs_config_get_string(NVS_CONFIG_DEVICE_MODEL, "");
|
||||
if (strcmp(GLOBAL_STATE.device_model_str, "max") == 0) {
|
||||
ESP_LOGI(TAG, "DEVICE: Max");
|
||||
GLOBAL_STATE.device_model = DEVICE_MAX;
|
||||
GLOBAL_STATE.asic_count = 1;
|
||||
GLOBAL_STATE.voltage_domain = 1;
|
||||
} else if (strcmp(GLOBAL_STATE.device_model_str, "ultra") == 0) {
|
||||
ESP_LOGI(TAG, "DEVICE: Ultra");
|
||||
GLOBAL_STATE.device_model = DEVICE_ULTRA;
|
||||
GLOBAL_STATE.asic_count = 1;
|
||||
GLOBAL_STATE.voltage_domain = 1;
|
||||
} else if (strcmp(GLOBAL_STATE.device_model_str, "supra") == 0) {
|
||||
ESP_LOGI(TAG, "DEVICE: Supra");
|
||||
GLOBAL_STATE.device_model = DEVICE_SUPRA;
|
||||
GLOBAL_STATE.asic_count = 1;
|
||||
GLOBAL_STATE.voltage_domain = 1;
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Invalid DEVICE model");
|
||||
// maybe should return here to now execute anything with a faulty device parameter !
|
||||
|
@ -15,8 +15,6 @@
|
||||
#define NVS_CONFIG_ASIC_FREQ "asicfrequency"
|
||||
#define NVS_CONFIG_ASIC_VOLTAGE "asicvoltage"
|
||||
#define NVS_CONFIG_ASIC_MODEL "asicmodel"
|
||||
#define NVS_CONFIG_ASIC_COUNT "asiccount"
|
||||
#define NVS_CONFIG_VOLTAGE_DOMAIN "voltagedomain"
|
||||
#define NVS_CONFIG_DEVICE_MODEL "devicemodel"
|
||||
#define NVS_CONFIG_BOARD_VERSION "boardversion"
|
||||
#define NVS_CONFIG_FLIP_SCREEN "flipscreen"
|
||||
|
@ -26,7 +26,7 @@ Starting with v2.0.0, the ESP-Miner firmware requires some basic manufacturing d
|
||||
1. Download the esp-miner-factory-v2.0.3.bin file from the release tab.
|
||||
Click [here](https://github.com/skot/ESP-Miner/releases) for the release tab
|
||||
|
||||
2. Copy `config.cvs.example` to `config.cvs` and modify `asicfrequency`, `asicvoltage`, `asicmodel`, `asiccount`, `voltagedomain`, `devicemodel`, and `boardversion`
|
||||
2. Copy `config.cvs.example` to `config.cvs` and modify `asicfrequency`, `asicvoltage`, `asicmodel`, `devicemodel`, and `boardversion`
|
||||
|
||||
The following are recommendations but it is necessary that you do have all values in your `config.cvs`file to flash properly.
|
||||
|
||||
@ -38,8 +38,6 @@ The following are recommendations but it is necessary that you do have all value
|
||||
asicfrequency,data,u16,490
|
||||
asicvoltage,data,u16,1200
|
||||
asicmodel,data,string,BM1368
|
||||
asiccount,data,u16,1
|
||||
voltagedomain,data,u16,1
|
||||
devicemodel,data,string,supra
|
||||
boardversion,data,string,400
|
||||
```
|
||||
@ -53,8 +51,6 @@ The following are recommendations but it is necessary that you do have all value
|
||||
asicvoltage,data,u16,1200
|
||||
asicmodel,data,string,BM1366
|
||||
asiccount,data,u16,1
|
||||
voltagedomain,data,u16,1
|
||||
devicemodel,data,string,ultra
|
||||
boardversion,data,string,0.11
|
||||
```
|
||||
|
||||
@ -66,8 +62,6 @@ The following are recommendations but it is necessary that you do have all value
|
||||
asicfrequency,data,u16,475
|
||||
asicvoltage,data,u16,1400
|
||||
asicmodel,data,string,BM1397
|
||||
asiccount,data,u16,1
|
||||
voltagedomain,data,u16,1
|
||||
devicemodel,data,string,max
|
||||
boardversion,data,string,2.2
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user