mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-04-10 04:49:16 +02:00
gui hex stuff
This commit is contained in:
parent
9f040b2d95
commit
8c24356765
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"idf.flashType": "UART",
|
||||
"idf.portWin": "COM3",
|
||||
"idf.portWin": "COM49",
|
||||
"idf.adapterTargetName": "esp32s3",
|
||||
"idf.openOcdConfigs": [
|
||||
"interface/ftdi/esp32_devkitj_v1.cfg",
|
||||
|
@ -100,11 +100,11 @@
|
||||
Power
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<p-knob [min]="4.5" [max]="5.5" [readonly]="true" [(ngModel)]="info.voltage"
|
||||
valueTemplate="{value}V"></p-knob>
|
||||
<div class="col-4" *ngIf="inputVoltage$ | async as inputVoltage">
|
||||
<p-knob [min]="inputVoltage.min" [max]="inputVoltage.max" [readonly]="true"
|
||||
[(ngModel)]="info.voltage" valueTemplate="{value}V"></p-knob>
|
||||
Input Voltage
|
||||
<span class="danger" *ngIf="info.voltage < 4.8"> Danger: Low voltage</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
@ -274,4 +274,4 @@
|
||||
</div>
|
||||
|
||||
|
||||
</ng-container>
|
||||
</ng-container>
|
@ -24,6 +24,8 @@ export class HomeComponent {
|
||||
public dataData: number[] = [];
|
||||
public chartData?: any;
|
||||
|
||||
public inputVoltage$: Observable<{ min: number, max: number }>;
|
||||
|
||||
constructor(
|
||||
private systemService: SystemService
|
||||
) {
|
||||
@ -133,6 +135,15 @@ export class HomeComponent {
|
||||
|
||||
this.expectedHashRate$ = this.info$.pipe(map(info => {
|
||||
return Math.floor(info.frequency * ((info.coreCount * info.asicCount) / 1000))
|
||||
}));
|
||||
|
||||
this.inputVoltage$ = this.info$.pipe(map(info => {
|
||||
const version = parseInt(info.boardVersion);
|
||||
if (version >= 300 && version < 400) {
|
||||
return { min: 11, max: 13 };
|
||||
} else {
|
||||
return { min: 4.5, max: 5.5 };
|
||||
}
|
||||
}))
|
||||
|
||||
this.quickLink$ = this.info$.pipe(
|
||||
|
Loading…
x
Reference in New Issue
Block a user