• TMRh20's avatar
    Fix: Multicast pipe0 address handling issue · 9da3eac0
    TMRh20 authored
    Previous behaviour:
    1. Radio #1: Pipe 0 opened for writing (Address1), pipe 1 opened for
    reading (Address2)
    2. The radio would end up listening on the following pipes/addresses,
    because pipe0 was not assigned a separate reading address.
    Pipe0: Address1
    Pipe1: Address2
    3. This is generally not a problem with 2 radios, but when multicasting
    with three. If two of the radios transmit to the same address, then
    start listening, all three radios will be listening to the same address
    on pipe0, unless pipe0 has been assigned a separate reading address
    
    New behaviour:
    1. Radio #1: Pipe 0 opened for writing (Address1), pipe 1 opened for
    reading (Address2)
    2. When calling radio.startListening() pipe0 is closed, because it is
    not assigned a reading address
    3. Pipe0 is re-opened for writing only, unless a reading address is
    assigned to pipe0
    
    This wouldn't really affect things while using auto-ack, because two
    radios should not be writing to the same pipe/address.
    
    - Add closeReadingPipe for RPi
    - Also adjusted timing for startListening();
    - Fix failure detect variable on RPi
    9da3eac0
RF24.cpp 35.9 KB