Quellcode durchsuchen

Fix the rx0 address

The address was set for the wrong address and thus the module could not
receive acks from the base station
Bernd Gottschlag vor 5 Jahren
Ursprung
Commit
9694fa3913
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2
    2
      weather-sensor/firmware/nrf24l01.c

+ 2
- 2
weather-sensor/firmware/nrf24l01.c Datei anzeigen

@@ -68,7 +68,7 @@ void Configure_Transmission(uint8_t moduleId)
68 68
 	SETUP_RETR_REGISTER setupRetrRegisterContents = {.byte = 0x0};
69 69
 
70 70
 	uint8_t txAddress[5] = {0xB3, 0xB3, 0xB3, 0xB3, 0x00};
71
-	uint8_t rx0Address[5] = {0xB3, 0xB3, 0xB3, 0xB3, 0x20};
71
+	uint8_t rx0Address[5] = {0xB3, 0xB3, 0xB3, 0xB3, 0x00};
72 72
 	/* 
73 73
 	 * - Length of CRC (CRCO in CONFIG)
74 74
 	 * - Enable auto acknowledgment (EN_AA)
@@ -103,7 +103,7 @@ void Configure_Transmission(uint8_t moduleId)
103 103
 	/* Set the TX address */
104 104
 	Set_TX_Address(txAddress, MAX_ADDRESS_LENGTH);
105 105
 
106
-	rx0Address[4] = moduleId; // The last byte of the address corresponds to the Id set by the pin programming
106
+	/* Set the RX_P0 address to the one of the base station to receive acks */
107 107
 	Set_RX_P0_Address(rx0Address, MAX_ADDRESS_LENGTH);
108 108
 
109 109
 

Laden…
Abbrechen
Speichern