Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<ng-template #noTemp>--</ng-template>
<ng-container *ngIf="info$ | async as info">
<!-- Temp warning alert -->
<p-message *ngIf="info.overheat_mode" severity="error" styleClass="w-full mb-4 py-4 border-round-xl"
Expand Down Expand Up @@ -204,7 +205,6 @@ <h4 class="text-center">Heat</h4>
<h6 class="flex justify-content-between mb-1">
ASIC Temperature
<span>
<ng-template #noTemp>--</ng-template>
<ng-container *ngIf="info.temp > 0; else noTemp">
{{info.temp}} &deg;C
</ng-container>
Expand Down Expand Up @@ -293,8 +293,30 @@ <h5>Pool ({{ activePoolLabel }})</h5>

<div class="col-12 md:col-6">
<div class="card">
<h5>Uptime</h5>
{{info.uptimeSeconds | dateAgo}}
<h5>Uptime Information</h5>
<table>
<tr>
<td colspan="2">{{info.uptimeSeconds | dateAgo}}</td>
</tr>
</table>
<table>
<tr>
<td class="text-500 pr-2">Maximum ASIC Temperature</td>
<td>
<ng-container *ngIf="info.tempMax > 0; else noTemp">
{{info.tempMax}}&deg;C
</ng-container>
</td>
</tr>
<ng-container *ngIf="info.vrTempMax > 0">
<tr>
<td class="text-500 pr-2">Maximum VR Temperature</td>
<td>
{{info.vrTempMax}}&deg;C
</td>
</tr>
</ng-container>
</table>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export class HomeComponent {
info.coreVoltageActual = parseFloat((info.coreVoltageActual / 1000).toFixed(2));
info.coreVoltage = parseFloat((info.coreVoltage / 1000).toFixed(2));
info.temp = parseFloat(info.temp.toFixed(1));
info.tempMax = parseFloat(info.tempMax.toFixed(1));

return info;
}),
Expand Down
2 changes: 2 additions & 0 deletions main/http_server/axe-os/src/app/services/system.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export class SystemService {
voltage: 5208.75,
current: 2237.5,
temp: 60,
tempMax: 63,
vrTemp: 45,
vrTempMax: 48,
maxPower: 25,
nominalVoltage: 5,
hashRate: 475,
Expand Down
2 changes: 2 additions & 0 deletions main/http_server/axe-os/src/models/ISystemInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export interface ISystemInfo {
voltage: number,
current: number,
temp: number,
tempMax: number,
vrTemp: number,
vrTempMax: number,
maxPower: number,
nominalVoltage: number,
hashRate: number,
Expand Down
2 changes: 2 additions & 0 deletions main/http_server/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,9 @@ static esp_err_t GET_system_info(httpd_req_t * req)
cJSON_AddNumberToObject(root, "voltage", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.voltage);
cJSON_AddNumberToObject(root, "current", Power_get_current(GLOBAL_STATE));
cJSON_AddNumberToObject(root, "temp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.chip_temp_avg);
cJSON_AddNumberToObject(root, "tempMax", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.chip_temp_max);
cJSON_AddNumberToObject(root, "vrTemp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.vr_temp);
cJSON_AddNumberToObject(root, "vrTempMax", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.vr_temp_max);
cJSON_AddNumberToObject(root, "maxPower", GLOBAL_STATE->DEVICE_CONFIG.family.max_power);
cJSON_AddNumberToObject(root, "nominalVoltage", GLOBAL_STATE->DEVICE_CONFIG.family.nominal_voltage);
cJSON_AddNumberToObject(root, "hashRate", GLOBAL_STATE->SYSTEM_MODULE.current_hashrate);
Expand Down
8 changes: 8 additions & 0 deletions main/http_server/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ components:
- stratumURL
- stratumUser
- temp
- tempMax
- uptimeSeconds
- version
- axeOSVersion
- voltage
- vrTemp
- vrTempMax
- wifiStatus
- wifiRSSI
- displayTimeout
Expand Down Expand Up @@ -288,6 +290,9 @@ components:
temp:
type: number
description: Average chip temperature
tempMax:
type: number
description: Maximum average chip temperature
uptimeSeconds:
type: number
description: System uptime in seconds
Expand All @@ -303,6 +308,9 @@ components:
vrTemp:
type: number
description: Voltage regulator temperature
vrTempMax:
type: number
description: Maximum voltage regulator temperature
wifiStatus:
type: string
description: WiFi connection status
Expand Down
11 changes: 10 additions & 1 deletion main/tasks/power_management_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ void POWER_MANAGEMENT_task(void * pvParameters)
power_management->frequency_value = nvs_config_get_u16(NVS_CONFIG_ASIC_FREQ, CONFIG_ASIC_FREQUENCY);
ESP_LOGI(TAG, "ASIC Frequency: %.2fMHz", (float)power_management->frequency_value);
uint16_t last_asic_frequency = power_management->frequency_value;


power_management->chip_temp_max = 0.0;
power_management->vr_temp_max = 0.0;

while (1) {

// Refresh PID setpoint from NVS in case it was changed via API
Expand All @@ -83,8 +86,14 @@ void POWER_MANAGEMENT_task(void * pvParameters)

power_management->fan_rpm = Thermal_get_fan_speed(&GLOBAL_STATE->DEVICE_CONFIG);
power_management->chip_temp_avg = Thermal_get_chip_temp(GLOBAL_STATE);
if (power_management->chip_temp_avg > power_management->chip_temp_max) {
power_management->chip_temp_max = power_management->chip_temp_avg;
}

power_management->vr_temp = Power_get_vreg_temp(GLOBAL_STATE);
if (power_management->vr_temp > power_management->vr_temp_max) {
power_management->vr_temp_max = power_management->vr_temp;
}

// ASIC Thermal Diode will give bad readings if the ASIC is turned off
// if(power_management->voltage < tps546_config.TPS546_INIT_VOUT_MIN){
Expand Down
2 changes: 2 additions & 0 deletions main/tasks/power_management_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ typedef struct
uint16_t fan_rpm;
float chip_temp[6];
float chip_temp_avg;
float chip_temp_max;
float vr_temp;
float vr_temp_max;
float voltage;
float frequency_value;
float power;
Expand Down
Loading