From e1f078a037e0749eb83b5a0966edf7f58c64d206 Mon Sep 17 00:00:00 2001 From: Minera Date: Tue, 9 Oct 2018 18:13:56 +0200 Subject: [PATCH] Fix for Z9 mini --- application/models/util_model.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/models/util_model.php b/application/models/util_model.php index d68fc4c..4067721 100644 --- a/application/models/util_model.php +++ b/application/models/util_model.php @@ -479,7 +479,7 @@ public function getParsedStats($stats, $network = false) $devicePoolActives = array_count_values($devicePoolIndex); } - // Antminer L3+ + // New Antminer if ($antNew && isset($stats->stats[0]->STATS[1]) && isset($stats->summary[0]->SUMMARY[0])) { $device = $stats->stats[0]->STATS[1]; $summaryAntNew = $stats->summary[0]->SUMMARY[0]; @@ -535,6 +535,12 @@ public function getParsedStats($stats, $network = false) } else { $cgbfgminerPoolHashrate = round(($totals->{'Work Utility'}*71582788), 0); } + + if (!$tdhashrate) $return['totals']['hashrate'] = $cgbfgminerPoolHashrate; + + if (!$antNew && !isset($stats->devs[0]->DEVS)) { + $return['devices']['Unknown'] = $return['totals']; + } } } @@ -570,6 +576,7 @@ public function getParsedStats($stats, $network = false) { $return['pool']['url'] = $pool->url; $return['pool']['alive'] = $pool->alive; + $devicePoolIndex[] = $poolIndex; } $return['pool']['hashrate'] = $cgbfgminerPoolHashrate;