anchor.diff:              FOptsOut
       end.
   
  -add_when_one(_Error, 0, List) -> List;
  -add_when_one(Error, 1, List) -> [Error|List].
  +add_when_zero(Error, 0, List) -> [Error|List];
  +add_when_zero(_Error, 1, List) -> List.
   
   % end of file
  
positive.code:         {RX1DROffsetACK, RX2DataRateACK, ChannelACK} ->
              lorawan_utils:throw_warning({node, Node#node.devaddr}, {rxwin_setup_failed, {RX1DROffsetACK, RX2DataRateACK, ChannelACK}}),
              % indicate the settings that failed
              {true, Node#node{rxwin_failed = add_when_one(<<"dr_offset">>, RX1DROffsetACK,
                  add_when_one(<<"rx2_data_rate">>, RX2DataRateACK, add_when_one(<<"channel">>, ChannelACK, [])))}};
          undefined ->
              {false, Node}
      end.
  
negative.code:             lorawan_utils:throw_warning({node, Node#node.devaddr},
                  {adr_req_failed, {PowerACK, DataRateACK, ChannelMaskACK}}),
              % indicate the settings that failed
              Node#node{adr_failed = add_when_zero(<<"power">>, PowerACK,
                  add_when_zero(<<"data_rate">>, DataRateACK, add_when_zero(<<"channel_mask">>, ChannelMaskACK, [])))};
          undefined ->
              Node
      end.
  