Skip to content

Commit

Permalink
Merge pull request #40 from shufps/fix-swap-hashrate
Browse files Browse the repository at this point in the history
adds the old `hashRate` field to the info reponse because swarm uses it
  • Loading branch information
shufps authored Nov 12, 2024
2 parents d681817 + be73d72 commit e6de121
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 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 @@ -19,6 +19,7 @@ const defaultInfo: ISystemInfo = {
temp: 60,
vrTemp: 45,
hashRateTimestamp: 1724398272483,
hashRate: 475,
hashRate_10m: 475,
hashRate_1h: 475,
hashRate_1d: 475,
Expand Down
1 change: 1 addition & 0 deletions main/http_server/axe-os/src/models/ISystemInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface ISystemInfo {
temp: number,
vrTemp: number,
hashRateTimestamp: number,
hashRate: number,
hashRate_10m: number,
hashRate_1h: number,
hashRate_1d: number,
Expand Down
1 change: 1 addition & 0 deletions main/http_server/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ static esp_err_t GET_system_info(httpd_req_t *req)
cJSON_AddNumberToObject(root, "temp", POWER_MANAGEMENT_MODULE.getAvgChipTemp());
cJSON_AddNumberToObject(root, "vrTemp", POWER_MANAGEMENT_MODULE.getVrTemp());
cJSON_AddNumberToObject(root, "hashRateTimestamp", history->getCurrentTimestamp());
cJSON_AddNumberToObject(root, "hashRate", history->getCurrentHashrate10m());
cJSON_AddNumberToObject(root, "hashRate_10m", history->getCurrentHashrate10m());
cJSON_AddNumberToObject(root, "hashRate_1h", history->getCurrentHashrate1h());
cJSON_AddNumberToObject(root, "hashRate_1d", history->getCurrentHashrate1d());
Expand Down

0 comments on commit e6de121

Please sign in to comment.