remove useless target_mode check on Luos_MsgHandler
@@ -93,8 +93,8 @@ void Luos_Loop(void)
if (!Luos_MsgHandler((container_t *)container, returned_msg))
{
// we should not go there there is a mistake on Luos_IsALuosCmd or Luos_MsgHandler
- // This message is for the user, pass it to the user.
- container->cont_cb(container, returned_msg);
+ while (1)
+ ;
}
else
{
@@ -182,11 +182,6 @@ static int8_t Luos_MsgHandler(container_t *container, msg_t *input)
msg_t routeTB_msg;
routing_table_t *route_tab = &RoutingTB_Get()[RoutingTB_GetLastEntry()];
time_luos_t time;
- if (input->header.target_mode == ID ||
- input->header.target_mode == IDACK ||
- input->header.target_mode == TYPE ||
- input->header.target_mode == BROADCAST)
- {
switch (input->header.cmd)
{
case WRITE_ID:
@@ -197,7 +192,7 @@ static int8_t Luos_MsgHandler(container_t *container, msg_t *input)
(ctx.detection.keepline != NO_BRANCH) &
(ctx.detection_mode != MASTER_DETECT))
{
- if (input->header.target_mode == IDACK)
+ if ((input->header.target_mode == IDACK) | (input->header.target_mode == NODEIDACK))
{
// Acknoledge ID reception
Transmit_SendAck();
@@ -350,7 +345,6 @@ static int8_t Luos_MsgHandler(container_t *container, msg_t *input)
return 0;
break;
}
- }
return 0;
}
/******************************************************************************
