digidotcom / xbee-python

Python library to interact with Digi International's XBee radio frequency modules.
Mozilla Public License 2.0
185 stars 93 forks source link

packets/network: Fix RXIPv4Packet output() #176

Closed mikewadsten closed 1 year ago

mikewadsten commented 4 years ago

RXIPv4Packet defines needs_id() as returning True, which means that if output() is called (i.e. as part of a step to log a received API frame to a file), the generated frame will incorrectly contain a frame ID field after the length and frame type.

Without this, I need to work around this in my own code by monkey-patching needs_id:

RXIPv4Packet.needs_id = lambda _: False
rubenmoral commented 1 year ago

Sorry @mikewadsten, I had completely missed this PR. I'm closing it since this was already fixed by @tatianaleon in https://github.com/digidotcom/xbee-python/commit/dff64d70bea8f52a350e046e29682a35d03dcb86.

mikewadsten commented 1 year ago

No worries, thanks for fixing it!