Skip to content

Commit

Permalink
fix: Repair channel loading failed
Browse files Browse the repository at this point in the history
  • Loading branch information
lsxredrain committed Sep 22, 2021
1 parent d6110bb commit 1898ebe
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions apps/dgiot/src/channel/dgiot_channelx.erl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ spec() ->


spec(SerName) ->
dgiot_pool_sup:spec(SerName).
%% {dgiot_channelx_mgr, {dgiot_channelx_mgr, start_link, [SerName]}, permanent, 5000, supervisor, [dgiot_channelx_mgr]}.
{dgiot_channelx_mgr, {dgiot_channelx_mgr, start_link, [SerName]}, permanent, 5000, supervisor, [dgiot_channelx_mgr]}.

status(Pid) when is_pid(Pid) ->
gen_statem:call(Pid, status);
Expand Down
1 change: 0 additions & 1 deletion apps/dgiot/src/channel/dgiot_channelx_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ init([ChannelType, ChannelId, Mod]) ->
case dgiot_data:lookup({Name, channel}) of
{ok, {_, ChannelArgs}} ->
Size = maps:get(<<"Size">>, ChannelArgs, 5),

MaxOverFlow = maps:get(<<"MaxOverFlow">>, ChannelArgs, 10),
PoolArgs = [
{name, {local, Name}},
Expand Down
1 change: 0 additions & 1 deletion apps/dgiot/src/utils/dgiot_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ get_parity(Data) when is_list(Data) ->
lists:foldl(
fun(X, Sum) ->
((X rem 256) + Sum) rem 256

end, 0, Data).

%% CRC-16/MODBUS 算法:
Expand Down
1 change: 1 addition & 0 deletions apps/dgiot_bridge/src/handler/dgiot_bridge_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ handle(OperationID, Args, Context, Req) ->
%%%===================================================================
%%% 内部函数 Version:API版本
%%%===================================================================

do_request(post_control_channel, #{<<"id">> := ChannelId, <<"action">> := Action}, _Context, _Req)
when Action == <<"enable">>; Action == <<"disable">>; Action == <<"update">> ->
dgiot_bridge:control_channel(ChannelId, Action);
Expand Down

0 comments on commit 1898ebe

Please sign in to comment.