Selaa lähdekoodia

base-station: Fix RX address.

Mathias Gottschlag 5 vuotta sitten
vanhempi
commit
4a0d41a764
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4
    1
      base-station/software/src/radio.rs

+ 4
- 1
base-station/software/src/radio.rs Näytä tiedosto

@@ -93,10 +93,13 @@ impl<'a> Radio<'a> {
93 93
         nrf24.set_rf(DataRate::R2Mbps, 3)?;
94 94
         nrf24.set_crc(Some(CrcMode::OneByte))?;
95 95
         nrf24.set_auto_retransmit(250, 3)?;
96
-        nrf24.set_pipes_rx_enable(&[true, false, false, false, false, false])?; // TODO enable pipe 0 once the base station receives messages
96
+        nrf24.set_pipes_rx_enable(&[true, true, false, false, false, false])?; // TODO enable pipe 0 once the base station receives messages
97 97
         nrf24
98 98
             .set_rx_addr(0, &[0xB3, 0xB3, 0xB3, 0xB3, 0x00])
99 99
             .unwrap();
100
+        nrf24
101
+            .set_rx_addr(1, &[0xB3, 0xB3, 0xB3, 0xB3, 0x00])
102
+            .unwrap();
100 103
         nrf24.flush_rx().unwrap();
101 104
         nrf24.flush_tx().unwrap();
102 105
         nrf24.set_auto_ack(&[true; 6]).unwrap();

Loading…
Peruuta
Tallenna