Skip to content

Commit

Permalink
Update node_generic_tasks_functions.erl
Browse files Browse the repository at this point in the history
  • Loading branch information
Laymer authored Sep 12, 2018
1 parent b7fca69 commit a17cc42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/node_generic_tasks_functions.erl
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ cave_data(Index, Nav, Als) ->
Gyro = gen_server:call(Nav, {read, acc, [out_x_g, out_y_g, out_z_g], #{}}),
Raw = gen_server:call(Als, raw),
{_,{H,Mi,_}} = calendar:local_time(),
%% http://erlang.org/doc/programming_examples/bit_syntax.html
%% replace full float representation by
%% construction of XOR-schemes using bitstrings
%% similar to hashing process s.t. dissemination
%% of data is much lighter compared to gossiping of
%% floats.
{ok, {_, _, _, _}} = lasp:update(node_util:atom_to_lasp_identifier(node(),state_gset), {add, [Index, H*60 + Mi,Raw,Press,Temp,Mag,Gyro]}, self()),
timer:sleep(5000),
cave_data(Index+1,Nav,Als).
Expand Down

0 comments on commit a17cc42

Please sign in to comment.