50 |
(if !!verbose then lprintf' "Enable network %d %b\n" num b); |
(if !!verbose then lprintf' "Enable network %d %b\n" num b); |
51 |
GuiCom.send (EnableNetwork (num, b)) |
GuiCom.send (EnableNetwork (num, b)) |
52 |
|
|
|
let update_networks () = () |
|
|
(* |
|
|
TODO : |
|
|
the core should update the values ... but it doesn't |
|
|
Hashtbl.iter (fun num n -> |
|
|
(* Printf.printf "Update network %d %b\n" num n.net_enabled; |
|
|
flush stdout; *) |
|
|
if n.net_enabled |
|
|
then GuiCom.send (GetNetworkInfo num) |
|
|
) G.networks |
|
|
*) |
|
|
|
|
53 |
(*************************************************************************) |
(*************************************************************************) |
54 |
(* *) |
(* *) |
55 |
(* Global tables *) |
(* Global tables *) |
322 |
n := 0; |
n := 0; |
323 |
end |
end |
324 |
) net_list; |
) net_list; |
|
(* |
|
|
networks_timerID := Timeout.add ~ms:6000 ~callback: |
|
|
(fun _ -> |
|
|
(* Printf.printf "Update networks\n"; |
|
|
flush stdout; *) |
|
|
update_networks (); |
|
|
true); |
|
|
*) |
|
325 |
vbox#coerce |
vbox#coerce |