Browse Source

Remove unneeded TODOs

Bernd Gottschlag 5 years ago
parent
commit
b0cfbc928f

+ 1
- 1
weather-sensor/firmware/main.c View File

16
 #include "bme280_defs.h"
16
 #include "bme280_defs.h"
17
 #include "pin_programming.h"
17
 #include "pin_programming.h"
18
 #include "radio.h"
18
 #include "radio.h"
19
+#include "encryption.h"
19
 
20
 
20
 
21
 
21
 
22
 
106
 		}
107
 		}
107
 		else
108
 		else
108
 		{
109
 		{
109
-			/* TODO: enter power save mode instead to make the battery life longer */
110
 			_delay_ms(100);
110
 			_delay_ms(100);
111
 		}
111
 		}
112
 	} while (saltReceived == false);
112
 	} while (saltReceived == false);

+ 1
- 8
weather-sensor/firmware/nrf24l01.c View File

4
 #include <stdio.h>
4
 #include <stdio.h>
5
 #include <stdbool.h>
5
 #include <stdbool.h>
6
 
6
 
7
-#include "led.h" // TODO: for debugging
8
 #include "spi.h"
7
 #include "spi.h"
9
 #include "nrf24l01.h"
8
 #include "nrf24l01.h"
10
 #include "nrf24l01_definitions.h"
9
 #include "nrf24l01_definitions.h"
11
 
10
 
12
-/* TODO
13
- * - Send functions
14
- * - Interrupt handling for Send
15
- */
16
-
17
 extern volatile bool nrfInterruptRaised;
11
 extern volatile bool nrfInterruptRaised;
18
 
12
 
19
 void Print_Register_Contents(uint8_t address);
13
 void Print_Register_Contents(uint8_t address);
61
 	NRF_CE_PORT &= ~(1 << NRF_CE_PIN);
55
 	NRF_CE_PORT &= ~(1 << NRF_CE_PIN);
62
 
56
 
63
 	/* Set the interrupt pin */
57
 	/* Set the interrupt pin */
64
-	/* TODO: PCINT21 -> PCINT2 */
65
 	NRF_IRQ_DDR &= ~(1 << NRF_IRQ_PIN); // Set the pin as input
58
 	NRF_IRQ_DDR &= ~(1 << NRF_IRQ_PIN); // Set the pin as input
66
 	NRF_IRQ_PORT |= (1 << NRF_IRQ_PORT); // Enable the pullup for the pin
59
 	NRF_IRQ_PORT |= (1 << NRF_IRQ_PORT); // Enable the pullup for the pin
67
 }
60
 }
247
 
240
 
248
 	if (messageReceived == true)
241
 	if (messageReceived == true)
249
 	{
242
 	{
250
-		Read_Message_From_RX_FIFO(PACKET_LENGTH, buffer); /* TODO: only possible after CE = 0? */
243
+		Read_Message_From_RX_FIFO(PACKET_LENGTH, buffer);
251
 	}
244
 	}
252
 
245
 
253
 	/* Reset the interrupts */
246
 	/* Reset the interrupts */

+ 0
- 2
weather-sensor/firmware/nrf24l01_definitions.h View File

146
 #define RF_OUTPUT_POWER_MINUS_16DBM
146
 #define RF_OUTPUT_POWER_MINUS_16DBM
147
 #define RF_OUTPUT_POWER_0DBM
147
 #define RF_OUTPUT_POWER_0DBM
148
 
148
 
149
-// TODO: change order of all bit fields!!!
150
-
151
 /* STATUS */
149
 /* STATUS */
152
 typedef union
150
 typedef union
153
 {
151
 {

+ 1
- 4
weather-sensor/firmware/radio.c View File

5
 
5
 
6
 bool Send_Message(PACKET * packet, uint64_t * salt);
6
 bool Send_Message(PACKET * packet, uint64_t * salt);
7
 
7
 
8
-bool Send_Get_Salt_Message(PACKET * packet, uint64_t * salt) //TODO: put into own file
8
+bool Send_Get_Salt_Message(PACKET * packet, uint64_t * salt)
9
 {
9
 {
10
 	memset((uint8_t*)packet, 0, PACKET_LENGTH); //Reinitialize the buffer with zeros
10
 	memset((uint8_t*)packet, 0, PACKET_LENGTH); //Reinitialize the buffer with zeros
11
 
11
 
61
 	uint16_t crcRemainder = 0xFFFF;
61
 	uint16_t crcRemainder = 0xFFFF;
62
 	uint64_t baseStationSalt = 0x0;
62
 	uint64_t baseStationSalt = 0x0;
63
 
63
 
64
-
65
-	/* TODO: check that the packet originated from the base station by checking the id */
66
-
67
 	baseStationSalt = packet->salt;
64
 	baseStationSalt = packet->salt;
68
 	Decrypt((uint32_t*)packet->payload.buffer,
65
 	Decrypt((uint32_t*)packet->payload.buffer,
69
 	        PACKET_PAYLOAD_BUFFER_LENGTH + sizeof(packet->crc),
66
 	        PACKET_PAYLOAD_BUFFER_LENGTH + sizeof(packet->crc),

+ 1
- 1
weather-sensor/firmware/radio.h View File

6
 #include "bme280_defs.h"
6
 #include "bme280_defs.h"
7
 #include "nrf24l01.h"
7
 #include "nrf24l01.h"
8
 
8
 
9
-bool Send_Get_Salt_Message(PACKET * packet, uint64_t * salt); //TODO: put into own file
9
+bool Send_Get_Salt_Message(PACKET * packet, uint64_t * salt);
10
 bool Read_Salt_Message(PACKET * packet, uint64_t * salt);
10
 bool Read_Salt_Message(PACKET * packet, uint64_t * salt);
11
 bool Send_Report_Message(PACKET * packet, uint64_t * salt, struct bme280_data * sensorData);
11
 bool Send_Report_Message(PACKET * packet, uint64_t * salt, struct bme280_data * sensorData);
12
 
12
 

Loading…
Cancel
Save