Fixed fan speed web update #141 (#222)

* Fixed fan speed web update #141

These changes fix fan rpm/percent requested and update both on the web

* fix readme

* refactor self_test to be modular for new hardware

* Supra 402 (#221)

* port TCH Supra 402 branch

* refactor TMP1075 (unused?) driver using i2c_master module

* pulled in @Bitmaker-hub stratum_task.c DNS changes from PR #185

* removing serial debug

---------

Co-authored-by: Skot <skot@bitnet.cx>

* adjust share accpeted/rejected functions to take higher level GLOBAL_STATE to fix share accounting.

* Code clean resulting from looking into #218 (#220)

* Code clean resulting from looking into #218

* Fixed asic count

Set canary value for invalid device's asic_count

---------

Co-authored-by: tommy <tommy@tommywatson.com>

* fix another pointer error

* Changes efficiency metric display in AxeOS (#231)

Fixes https://github.com/skot/ESP-Miner/issues/230

* try to explain nonce space duration from paramters (#228)

* try to explain nonce space duration from paramters

* Fix Nonce Space duration for BM1397 (no version-rolling)

* fixed issue with version mask on 1397. added easy serial debugging on 1397

* cleanup jobID debugs

---------

Co-authored-by: Skot <skot@bitnet.cx>

* Update bm1397.c to increase the max frequency to 650Mhz (#209)

* Update bm1397.c to increase the max frequency to 650Mhz

The original version was setting everything above 500Mhz to 500Mhz, the update increases the limit to 650Mhz.
No changes to the web interface - drop-down still shows up to 575Mhz

* Update edit.component.ts to include higher freqeuncy for BM1397

* Updated BM1397 frequencies to above 500Mhz

* Update bm1397.c

* Update bm1397.c

* UN-Update readme.md

* Update bm1397.c

* Update bm1397.c

* Update bm1397.c

* fix: add recovery page (#232)

Adds a recovery web interface to enable users
to recover from a failed www.bin update.
Partial fix for Issue #213.

* refactor: unify merge_bin scripts (#189)

Combines the functionality of merge_bin_update.sh
and merge_bin_with_config.sh into merge_bin.sh.
Also adds more verbose usage printing.

* fix: check www.bin size before updating (#216)

Adds a basic sanity check for www.bin uploading.
Returns 400 if upload is attempted on a file larger
than the available partition space.

---------

Co-authored-by: tommy <tommy@tommywatson.com>
Co-authored-by: Georges Palauqui <g.palauqui@gptechinno.com>
Co-authored-by: Skot <skot@bitnet.cx>
Co-authored-by: Nathan Day <87125117+dadofsambonzuki@users.noreply.github.com>
Co-authored-by: yanir99 <32940160+yanir99@users.noreply.github.com>
Co-authored-by: tdb3 <106488469+tdb3@users.noreply.github.com>
This commit is contained in:
tommywatson 2024-06-20 16:23:53 -05:00 committed by GitHub
parent 50235ace39
commit c011895dff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 34 additions and 17 deletions

View File

@ -121,7 +121,7 @@
<div class="card">
<h5>Heat</h5>
<div class="grid text-center">
<div class="col-6">
<div class="col-4">
<p-knob [min]="20" [max]="75" [readonly]="true" [(ngModel)]="info.temp"
valueTemplate="{value}C"></p-knob>
ASIC Temperature
@ -142,8 +142,14 @@
<div class="col-4">
<p-knob [min]="0" [max]="100" [readonly]="true" [(ngModel)]="info.fanspeed"
valueTemplate="{value}%"></p-knob>
Fan
Fan %
</div>
<div class="col-4">
<p-knob [min]="0" [max]="20000" [readonly]="true" [(ngModel)]="info.fanrpm"
valueTemplate="{value}"></p-knob>
Fan RPM
</div>
<!--
<div class="col-6" *ngIf="info.boardtemp1">
<p-knob [min]="20" [max]="75" [readonly]="true" [(ngModel)]="info.boardtemp1"
valueTemplate="{value}C"></p-knob>
@ -154,6 +160,7 @@
valueTemplate="{value}C"></p-knob>
Board Temp 2
</div>
-->
</div>
</div>
</div>
@ -214,4 +221,4 @@
</div>
</ng-container>
</ng-container>

View File

@ -24,7 +24,6 @@ export class SystemService {
power: 11.670000076293945,
voltage: 5208.75,
current: 2237.5,
fanSpeed: 82,
temp: 60,
vrTemp: 45,
hashRate: 475,
@ -54,6 +53,7 @@ export class SystemService {
invertfanpolarity: 1,
autofanspeed: 1,
fanspeed: 100,
fanrpm: 0,
boardtemp1: 30,
boardtemp2: 40

View File

@ -7,7 +7,6 @@ export interface ISystemInfo {
power: number,
voltage: number,
current: number,
fanSpeed: number,
temp: number,
vrTemp: number,
hashRate: number,
@ -33,8 +32,9 @@ export interface ISystemInfo {
invertfanpolarity: number,
autofanspeed: number,
fanspeed: number,
fanrpm: number,
coreVoltageActual: number,
boardtemp1?: number,
boardtemp2?: number
}
}

View File

@ -368,7 +368,6 @@ static esp_err_t GET_system_info(httpd_req_t * req)
cJSON_AddNumberToObject(root, "power", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.power);
cJSON_AddNumberToObject(root, "voltage", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.voltage);
cJSON_AddNumberToObject(root, "current", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.current);
cJSON_AddNumberToObject(root, "fanSpeedRpm", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.fan_speed);
cJSON_AddNumberToObject(root, "temp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.chip_temp_avg);
cJSON_AddNumberToObject(root, "vrTemp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.vr_temp);
cJSON_AddNumberToObject(root, "hashRate", GLOBAL_STATE->SYSTEM_MODULE.current_hashrate);
@ -417,7 +416,9 @@ static esp_err_t GET_system_info(httpd_req_t * req)
cJSON_AddNumberToObject(root, "invertfanpolarity", nvs_config_get_u16(NVS_CONFIG_INVERT_FAN_POLARITY, 1));
cJSON_AddNumberToObject(root, "autofanspeed", nvs_config_get_u16(NVS_CONFIG_AUTO_FAN_SPEED, 1));
cJSON_AddNumberToObject(root, "fanspeed", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.fan_percentage);
cJSON_AddNumberToObject(root, "fanspeed", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.fan_perc);
cJSON_AddNumberToObject(root, "fanrpm", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.fan_rpm);
free(ssid);
free(hostname);

View File

@ -209,7 +209,7 @@ static void _update_system_info(GlobalState * GLOBAL_STATE)
if (OLED_status()) {
memset(module->oled_buf, 0, 20);
snprintf(module->oled_buf, 20, " Fan: %d RPM", power_management->fan_speed);
snprintf(module->oled_buf, 20, " Fan: %d RPM", power_management->fan_rpm);
OLED_writeString(0, 0, module->oled_buf);
memset(module->oled_buf, 0, 20);

View File

@ -60,7 +60,9 @@ static double automatic_fan_speed(float chip_temp, GlobalState * GLOBAL_STATE)
case DEVICE_MAX:
case DEVICE_ULTRA:
case DEVICE_SUPRA:
EMC2101_set_fan_speed((float) result / 100);
float perc = (float) result / 100;
GLOBAL_STATE->POWER_MANAGEMENT_MODULE.fan_perc = perc;
EMC2101_set_fan_speed( perc );
break;
default:
}
@ -133,7 +135,9 @@ void POWER_MANAGEMENT_task(void * pvParameters)
power_management->current = INA260_read_current();
power_management->power = INA260_read_power() / 1000;
}
power_management->fan_speed = EMC2101_get_fan_speed();
power_management->fan_rpm = EMC2101_get_fan_speed();
break;
default:
}
@ -204,14 +208,19 @@ void POWER_MANAGEMENT_task(void * pvParameters)
}
if (auto_fan_speed == 1) {
power_management->fan_percentage = (float)automatic_fan_speed(power_management->chip_temp_avg, GLOBAL_STATE);
power_management->fan_perc = (float)automatic_fan_speed(power_management->chip_temp_avg, GLOBAL_STATE);
} else {
switch (GLOBAL_STATE->device_model) {
case DEVICE_MAX:
case DEVICE_ULTRA:
case DEVICE_SUPRA:
EMC2101_set_fan_speed((float) nvs_config_get_u16(NVS_CONFIG_FAN_SPEED, 100) / 100);
power_management->fan_percentage = (float)nvs_config_get_u16(NVS_CONFIG_FAN_SPEED, 100);
float fs = (float) nvs_config_get_u16(NVS_CONFIG_FAN_SPEED, 100);
power_management->fan_perc = fs;
EMC2101_set_fan_speed((float) fs / 100);
break;
default:
}

View File

@ -3,8 +3,8 @@
typedef struct
{
uint16_t fan_speed;
float fan_percentage;
uint16_t fan_perc;
uint16_t fan_rpm;
float chip_temp[6];
float chip_temp_avg;
float vr_temp;
@ -19,4 +19,4 @@ typedef struct
void POWER_MANAGEMENT_task(void * pvParameters);
#endif
#endif