浏览代码

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 5 年前
父节点
当前提交
9694fa3913
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      weather-sensor/firmware/nrf24l01.c

+ 2
- 2
weather-sensor/firmware/nrf24l01.c 查看文件

68
 	SETUP_RETR_REGISTER setupRetrRegisterContents = {.byte = 0x0};
68
 	SETUP_RETR_REGISTER setupRetrRegisterContents = {.byte = 0x0};
69
 
69
 
70
 	uint8_t txAddress[5] = {0xB3, 0xB3, 0xB3, 0xB3, 0x00};
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
 	 * - Length of CRC (CRCO in CONFIG)
73
 	 * - Length of CRC (CRCO in CONFIG)
74
 	 * - Enable auto acknowledgment (EN_AA)
74
 	 * - Enable auto acknowledgment (EN_AA)
103
 	/* Set the TX address */
103
 	/* Set the TX address */
104
 	Set_TX_Address(txAddress, MAX_ADDRESS_LENGTH);
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
 	Set_RX_P0_Address(rx0Address, MAX_ADDRESS_LENGTH);
107
 	Set_RX_P0_Address(rx0Address, MAX_ADDRESS_LENGTH);
108
 
108
 
109
 
109
 

正在加载...
取消
保存