mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-29 16:04:33 +00:00
API add device diff1 work
This commit is contained in:
parent
fd2034ce77
commit
93555e271a
@ -362,6 +362,9 @@ Added API commands:
|
||||
|
||||
Modified API commands:
|
||||
Change pool field name 'Diff1 Shares' to 'Diff1 Work'
|
||||
'devs' - add 'Diff1 Work' to all devices
|
||||
'gpu|N' - add 'Diff1 Work'
|
||||
'pga|N' - add 'Diff1 Work'
|
||||
|
||||
----------
|
||||
|
||||
|
3
api.c
3
api.c
@ -1345,6 +1345,7 @@ static void gpustatus(int gpu, bool isjson)
|
||||
root = api_add_int(root, "Last Share Pool", &last_share_pool, false);
|
||||
root = api_add_time(root, "Last Share Time", &(cgpu->last_share_pool_time), false);
|
||||
root = api_add_mhtotal(root, "Total MH", &(cgpu->total_mhashes), false);
|
||||
root = api_add_int(root, "Diff1 Work", &(cgpu->diff1), false);
|
||||
|
||||
root = print_data(root, buf, isjson);
|
||||
strcat(io_buffer, buf);
|
||||
@ -1428,6 +1429,7 @@ static void pgastatus(int pga, bool isjson)
|
||||
root = api_add_time(root, "Last Share Time", &(cgpu->last_share_pool_time), false);
|
||||
root = api_add_mhtotal(root, "Total MH", &(cgpu->total_mhashes), false);
|
||||
root = api_add_freq(root, "Frequency", &frequency, false);
|
||||
root = api_add_int(root, "Diff1 Work", &(cgpu->diff1), false);
|
||||
|
||||
root = print_data(root, buf, isjson);
|
||||
strcat(io_buffer, buf);
|
||||
@ -1460,6 +1462,7 @@ static void cpustatus(int cpu, bool isjson)
|
||||
root = api_add_int(root, "Last Share Pool", &last_share_pool, false);
|
||||
root = api_add_time(root, "Last Share Time", &(cgpu->last_share_pool_time), false);
|
||||
root = api_add_mhtotal(root, "Total MH", &(cgpu->total_mhashes), false);
|
||||
root = api_add_int(root, "Diff1 Work", &(cgpu->diff1), false);
|
||||
|
||||
root = print_data(root, buf, isjson);
|
||||
strcat(io_buffer, buf);
|
||||
|
@ -755,8 +755,12 @@ function fmt($section, $name, $value, $when, $alldata)
|
||||
case 'SUMMARY.Discarded':
|
||||
case 'POOL.Discarded':
|
||||
case 'total.Discarded':
|
||||
case 'POOL.Diff1 Shares':
|
||||
case 'total.Diff1 Shares':
|
||||
case 'GPU.Diff1 Work':
|
||||
case 'PGA.Diff1 Work':
|
||||
case 'POOL.Diff1 Work':
|
||||
case 'total.Diff1 Work':
|
||||
case 'POOL.Diff1 Shares': // old name
|
||||
case 'total.Diff1 Shares': // old name
|
||||
$parts = explode('.', $value, 2);
|
||||
if (count($parts) == 1)
|
||||
$dec = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user