lib/cosmos/packets/limits.rb in cosmos-3.4.2 vs lib/cosmos/packets/limits.rb in cosmos-3.5.0
- old
+ new
@@ -247,12 +247,15 @@
packet = packets[packet_name.to_s.upcase]
raise "Telemetry packet '#{target_name.to_s.upcase} #{packet_name.to_s.upcase}' does not exist" unless packet
return packet
end
- def includes_item?(array, target_name, packet_name, item_name)
- array.each do |array_target_name, array_packet_name, array_item_name|
- if ((array_target_name == target_name) && (array_packet_name == packet_name) && (array_item_name == item_name))
+ def includes_item?(ignored_items, target_name, packet_name, item_name)
+ ignored_items.each do |array_target_name, array_packet_name, array_item_name|
+ if ((array_target_name == target_name) &&
+ (array_packet_name == packet_name) &&
+ # If the item name is nil we're ignoring an entire packet
+ (array_item_name == item_name || array_item_name.nil?))
return true
end
end
return false
end