mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
opt. for performance
This commit is contained in:
@@ -114,10 +114,8 @@ List<OneTimeCpuStatus> parseCPU(String raw) {
|
||||
|
||||
final cpuTempReg = RegExp(r'(x86_pkg_temp|cpu_thermal)');
|
||||
|
||||
String parseCPUTemp(List<String> segments) {
|
||||
String parseCPUTemp(String type, String value) {
|
||||
const noMatch = "/sys/class/thermal/thermal_zone*/type";
|
||||
final type = segments[0];
|
||||
final value = segments[1];
|
||||
// Not support to get CPU temperature
|
||||
if (value.contains(noMatch) ||
|
||||
type.contains(noMatch) ||
|
||||
|
||||
@@ -6,9 +6,9 @@ class Server {
|
||||
ServerPrivateInfo spi;
|
||||
ServerStatus status;
|
||||
SSHClient? client;
|
||||
ServerState cs;
|
||||
ServerState state;
|
||||
|
||||
Server(this.spi, this.status, this.client, this.cs);
|
||||
Server(this.spi, this.status, this.client, this.state);
|
||||
}
|
||||
|
||||
enum ServerState {
|
||||
|
||||
Reference in New Issue
Block a user