Skip to content

Commit

Permalink
asds
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfa committed Feb 17, 2012
1 parent 868b67b commit 11fd3f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/saw_position.erl
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ handle_call(Msg, _From, State) ->
handle_cast({nulldurchlauf, T_abs, Durchlaufzeit}, #state{time={TAbs, TRun}, col={Col, Direction}, run_state=RunState}=State) ->
NewState = case RunState of
running ->
#state{time={T_abs, Durchlaufzeit}, col={64, up}, run_state=RunState};
#state{time={T_abs, Durchlaufzeit}, col={66, up}, run_state=RunState};
ready ->
TimerRef = erlang:send_after(delay(Durchlaufzeit), ?MODULE, column_changed),
#state{time={T_abs, Durchlaufzeit}, col={64, up}, run_state=running};
#state{time={T_abs, Durchlaufzeit}, col={66, up}, run_state=running};
stopped ->
State
end,
Expand All @@ -110,11 +110,11 @@ handle_cast(Msg, State) ->
%% --------------------------------------------------------------------

handle_info(column_changed, #state{time={TAbs, TRun}, col={Col, Direction}, run_state=RunState}=State) ->
NextCol = next_column(Col, Direction),
{NextCol, Dir} = next_column(Col, Direction),
erlang:send_after(delay(TRun), ?MODULE, column_changed),
error_logger:info_msg("Current col:p~", [NextCol]),
saw_sliding_w:print(NextCol),
{noreply, state};
{noreply, State#state{col={NextCol, Dir}}};
handle_info(Msg, State) ->
{noreply, State}.
Expand Down

0 comments on commit 11fd3f1

Please sign in to comment.