mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-26 17:51:45 +01:00
BM1368 voltage dropdown, log scrolling, restart button
This commit is contained in:
parent
b958b85d57
commit
e23e23db5f
@ -68,6 +68,10 @@ export class EditComponent implements OnInit {
|
||||
{ name: '1200', value: 1200 },
|
||||
{ name: '1250', value: 1250 },
|
||||
{ name: '1300', value: 1300 },
|
||||
{ name: '1350', value: 1350 },
|
||||
{ name: '1400', value: 1400 },
|
||||
{ name: '1450', value: 1450 },
|
||||
{ name: '1500', value: 1500 },
|
||||
];
|
||||
public BM1366CoreVoltage = [
|
||||
{ name: '1100', value: 1100 },
|
||||
|
@ -40,7 +40,7 @@ export class HomeComponent {
|
||||
datasets: [
|
||||
{
|
||||
type: 'line',
|
||||
label: '10 Minute',
|
||||
label: 'Hashrate',
|
||||
data: [],
|
||||
fill: false,
|
||||
backgroundColor: primaryColor,
|
||||
@ -135,14 +135,14 @@ export class HomeComponent {
|
||||
if (info.ASICModel === eASICModel.BM1366) {
|
||||
const version = parseInt(info.boardVersion);
|
||||
if (version >= 400 && version < 500) {
|
||||
return (info.frequency * ((894 * 6) / 1000))
|
||||
return Math.floor(info.frequency * ((894 * 6) / 1000))
|
||||
} else {
|
||||
return (info.frequency * (894 / 1000))
|
||||
return Math.floor(info.frequency * (894 / 1000))
|
||||
}
|
||||
} else if (info.ASICModel === eASICModel.BM1397) {
|
||||
return (info.frequency * (672 / 1000))
|
||||
return Math.floor(info.frequency * (672 / 1000))
|
||||
} else if (info.ASICModel === eASICModel.BM1368) {
|
||||
return (info.frequency * (1276 / 1000))
|
||||
return Math.floor(info.frequency * (1276 / 1000))
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
@ -37,7 +37,11 @@
|
||||
<h2>Realtime Logs <button pButton (click)="toggleLogs()" style="margin-left: 15px;"
|
||||
class="btn btn-secondary">{{showLogs
|
||||
? 'Hide': 'Show'}}
|
||||
Logs</button></h2>
|
||||
Logs</button>
|
||||
|
||||
<button pButton style="margin-left: 15px;" class="btn btn-secondary" (click)="stopScroll = !stopScroll"
|
||||
*ngIf="showLogs">{{stopScroll ? 'Start' : 'Stop'}} Scrolling</button>
|
||||
</h2>
|
||||
|
||||
<div *ngIf="showLogs" id="logs" #scrollContainer>
|
||||
<div *ngFor="let log of logs">₿ {{log | ANSI}}</div>
|
||||
|
@ -20,6 +20,8 @@ export class LogsComponent implements OnDestroy, AfterViewChecked {
|
||||
|
||||
public showLogs = false;
|
||||
|
||||
public stopScroll: boolean = false;
|
||||
|
||||
constructor(
|
||||
private websocketService: WebsocketService,
|
||||
private systemService: SystemService
|
||||
@ -65,6 +67,9 @@ export class LogsComponent implements OnDestroy, AfterViewChecked {
|
||||
}
|
||||
|
||||
ngAfterViewChecked(): void {
|
||||
if(this.stopScroll == true){
|
||||
return;
|
||||
}
|
||||
if (this.scrollContainer?.nativeElement != null) {
|
||||
this.scrollContainer.nativeElement.scrollTo({ left: 0, top: this.scrollContainer.nativeElement.scrollHeight, behavior: 'smooth' });
|
||||
}
|
||||
|
@ -4,4 +4,7 @@
|
||||
<li *ngIf="item.separator" class="menu-separator"></li>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<p-button id="restart" label="Restart" severity="danger"></p-button>
|
||||
|
||||
</ul>
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
<div class="layout-topbar-menu">
|
||||
<p-button (click)="restart()" label="Restart" severity="danger"></p-button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -132,4 +132,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#restart {
|
||||
bottom: 2rem;
|
||||
position: absolute;
|
||||
left: 8rem;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user