Fix display
This commit is contained in:
parent
c347eb1e8a
commit
6a4eca125d
@ -3,6 +3,6 @@
|
|||||||
{registered,[]},
|
{registered,[]},
|
||||||
{included_applications,[]},
|
{included_applications,[]},
|
||||||
{applications,[stdlib,kernel]},
|
{applications,[stdlib,kernel]},
|
||||||
{vsn,"0.1.0"},
|
{vsn,"0.1.2"},
|
||||||
{modules,[gajumine,gmc_con,gmc_gui,gmc_sup]},
|
{modules,[gajumine,gmc_con,gmc_gui,gmc_setup,gmc_sup]},
|
||||||
{mod,{gajumine,[]}}]}.
|
{mod,{gajumine,[]}}]}.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gajumine).
|
-module(gajumine).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.2").
|
||||||
-behavior(application).
|
-behavior(application).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_con).
|
-module(gmc_con).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.2").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -404,7 +404,7 @@ optimize_count() ->
|
|||||||
M = list_to_integer(string:strip(lists:nth(2, string:split(os:cmd("wmic computersystem get TotalPhysicalMemory"), "\r\r\n", all)))),
|
M = list_to_integer(string:strip(lists:nth(2, string:split(os:cmd("wmic computersystem get TotalPhysicalMemory"), "\r\r\n", all)))),
|
||||||
{P, M}
|
{P, M}
|
||||||
end,
|
end,
|
||||||
MeanMaps = Memory div (1_073_741_824 * 4),
|
MeanMaps = Memory div 3550722201,
|
||||||
Recommended = max(min(Procs, MeanMaps) - 1, 1),
|
Recommended = max(min(Procs, MeanMaps) - 1, 1),
|
||||||
Notice = fun(F, A) -> gmc_gui:message({notice, io_lib:format(F, A)}) end,
|
Notice = fun(F, A) -> gmc_gui:message({notice, io_lib:format(F, A)}) end,
|
||||||
ok = Notice("Physical Processors: ~p", [Procs]),
|
ok = Notice("Physical Processors: ~p", [Procs]),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_gui).
|
-module(gmc_gui).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.2").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -321,27 +321,39 @@ avg20(Now, LastTS, AvgDiff) ->
|
|||||||
|
|
||||||
do_message2(Entry, State = #s{mess = Mess, buff = Buff}) ->
|
do_message2(Entry, State = #s{mess = Mess, buff = Buff}) ->
|
||||||
NewBuff =
|
NewBuff =
|
||||||
case add_message(Entry, Buff) of
|
case os:type() of
|
||||||
{flush, Updated} ->
|
{unix, _} ->
|
||||||
String = unicode:characters_to_list(lists:reverse(element(5, Updated))),
|
add_message(Entry, Mess, Buff);
|
||||||
ok = wxTextCtrl:changeValue(Mess, String),
|
{win32, nt} ->
|
||||||
ok = wxTextCtrl:setInsertionPointEnd(Mess),
|
ok = wxTextCtrl:freeze(Mess),
|
||||||
Updated;
|
Updated = add_message(Entry, Mess, Buff),
|
||||||
{append, Updated} ->
|
Last = wxTextCtrl:getLastPosition(Mess),
|
||||||
ok = wxTextCtrl:appendText(Mess, Entry),
|
ok = wxTextCtrl:showPosition(Mess, Last),
|
||||||
|
ok = wxTextCtrl:thaw(Mess),
|
||||||
Updated
|
Updated
|
||||||
end,
|
end,
|
||||||
State#s{buff = NewBuff}.
|
State#s{buff = NewBuff}.
|
||||||
|
|
||||||
add_message(Entry, {OMax, OMax, IMax, IMax, [H | T]}) ->
|
add_message(Entry, Mess, Buff) ->
|
||||||
|
case add_message2(Entry, Buff) of
|
||||||
|
{flush, Updated} ->
|
||||||
|
String = unicode:characters_to_list(lists:reverse(element(5, Updated))),
|
||||||
|
ok = wxTextCtrl:changeValue(Mess, String),
|
||||||
|
Updated;
|
||||||
|
{append, Updated} ->
|
||||||
|
ok = wxTextCtrl:appendText(Mess, Entry),
|
||||||
|
Updated
|
||||||
|
end.
|
||||||
|
|
||||||
|
add_message2(Entry, {OMax, OMax, IMax, IMax, [H | T]}) ->
|
||||||
{flush, {OMax, OMax, IMax, 1, [[Entry] , lists:reverse(H) | lists:droplast(T)]}};
|
{flush, {OMax, OMax, IMax, 1, [[Entry] , lists:reverse(H) | lists:droplast(T)]}};
|
||||||
add_message(Entry, {OMax, OMax, IMax, ICur, [H | Buff]}) ->
|
add_message2(Entry, {OMax, OMax, IMax, ICur, [H | Buff]}) ->
|
||||||
{append, {OMax, OMax, IMax, ICur + 1, [[Entry | H] | Buff]}};
|
{append, {OMax, OMax, IMax, ICur + 1, [[Entry | H] | Buff]}};
|
||||||
add_message(Entry, {OMax, OCur, IMax, IMax, [H | T]}) ->
|
add_message2(Entry, {OMax, OCur, IMax, IMax, [H | T]}) ->
|
||||||
{append, {OMax, OCur + 1, IMax, 1, [[Entry], lists:reverse(H) | T]}};
|
{append, {OMax, OCur + 1, IMax, 1, [[Entry], lists:reverse(H) | T]}};
|
||||||
add_message(Entry, {OMax, OCur, IMax, ICur, [H | Buff]}) ->
|
add_message2(Entry, {OMax, OCur, IMax, ICur, [H | Buff]}) ->
|
||||||
{append, {OMax, OCur, IMax, ICur + 1, [[Entry | H] | Buff]}};
|
{append, {OMax, OCur, IMax, ICur + 1, [[Entry | H] | Buff]}};
|
||||||
add_message(Entry, {OMax, 0, IMax, 0, []}) ->
|
add_message2(Entry, {OMax, 0, IMax, 0, []}) ->
|
||||||
{append, {OMax, 1, IMax, 1, [[Entry]]}}.
|
{append, {OMax, 1, IMax, 1, [[Entry]]}}.
|
||||||
|
|
||||||
|
|
||||||
@ -362,9 +374,8 @@ eureka(State = #s{frame = Frame, j = J}) ->
|
|||||||
|
|
||||||
eureka_url() ->
|
eureka_url() ->
|
||||||
case gmc_con:network() of
|
case gmc_con:network() of
|
||||||
mainnet -> "https://gajumining.com";
|
<<"testnet">> -> "https://test.gajumining.com";
|
||||||
testnet -> "https://test.gajumining.com";
|
_ -> "https://gajumining.com"
|
||||||
none -> "https://gajumining.com"
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
@ -380,9 +391,8 @@ explorer(State = #s{frame = Frame, j = J, id = ID}) ->
|
|||||||
|
|
||||||
explorer_url() ->
|
explorer_url() ->
|
||||||
case gmc_con:network() of
|
case gmc_con:network() of
|
||||||
mainnet -> "https://groot.mainnet.gajumaru.io";
|
none -> "https://groot.mainnet.gajumaru.io";
|
||||||
testnet -> "https://groot.testnet.gajumaru.io";
|
Network -> unicode:characters_to_list(["https://groot.", Network, ".gajumaru.io"])
|
||||||
none -> "https://groot.mainnet.gajumaru.io"
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_setup).
|
-module(gmc_setup).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.2").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_sup).
|
-module(gmc_sup).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.2").
|
||||||
-behaviour(supervisor).
|
-behaviour(supervisor).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
|
12
zomp.meta
12
zomp.meta
@ -2,18 +2,18 @@
|
|||||||
{type,gui}.
|
{type,gui}.
|
||||||
{modules,[]}.
|
{modules,[]}.
|
||||||
{prefix,"gmc"}.
|
{prefix,"gmc"}.
|
||||||
{desc,"Mining client for the Gajumaru Root"}.
|
|
||||||
{author,"Craig Everett"}.
|
{author,"Craig Everett"}.
|
||||||
{package_id,{"qpq","gajumine",{0,1,0}}}.
|
{desc,"Mining client for the Gajumaru Root"}.
|
||||||
{deps,[{"qpq","cuckoo_cpu",{0,2,0}},
|
{package_id,{"qpq","gajumine",{0,1,2}}}.
|
||||||
|
{deps,[{"uwiger","gmconfig",{0,1,2}},
|
||||||
|
{"uwiger","gproc",{1,0,1}},
|
||||||
|
{"uwiger","gmhive_client",{0,2,1}},
|
||||||
|
{"qpq","cuckoo_cpu",{0,2,0}},
|
||||||
{"uwiger","gmhive_worker",{0,1,1}},
|
{"uwiger","gmhive_worker",{0,1,1}},
|
||||||
{"uwiger","gmhive_protocol",{0,1,1}},
|
{"uwiger","gmhive_protocol",{0,1,1}},
|
||||||
{"uwiger","gmhive_client",{0,1,3}},
|
|
||||||
{"uwiger","gproc",{1,0,0}},
|
|
||||||
{"uwiger","enoise",{1,3,0}},
|
{"uwiger","enoise",{1,3,0}},
|
||||||
{"uwiger","gmcuckoo",{1,1,0}},
|
{"uwiger","gmcuckoo",{1,1,0}},
|
||||||
{"uwiger","setup",{2,2,4}},
|
{"uwiger","setup",{2,2,4}},
|
||||||
{"uwiger","gmconfig",{0,1,1}},
|
|
||||||
{"otpr","hakuzaru",{0,6,1}},
|
{"otpr","hakuzaru",{0,6,1}},
|
||||||
{"otpr","gajudesk",{0,5,3}},
|
{"otpr","gajudesk",{0,5,3}},
|
||||||
{"otpr","zxwidgets",{1,0,1}},
|
{"otpr","zxwidgets",{1,0,1}},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user