Bläddra i källkod

Remove unneeded TODOs

Bernd Gottschlag 5 år sedan
förälder
incheckning
b0cfbc928f

+ 1
- 1
weather-sensor/firmware/main.c Visa fil

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

+ 1
- 8
weather-sensor/firmware/nrf24l01.c Visa fil

@@ -4,16 +4,10 @@
4 4
 #include <stdio.h>
5 5
 #include <stdbool.h>
6 6
 
7
-#include "led.h" // TODO: for debugging
8 7
 #include "spi.h"
9 8
 #include "nrf24l01.h"
10 9
 #include "nrf24l01_definitions.h"
11 10
 
12
-/* TODO
13
- * - Send functions
14
- * - Interrupt handling for Send
15
- */
16
-
17 11
 extern volatile bool nrfInterruptRaised;
18 12
 
19 13
 void Print_Register_Contents(uint8_t address);
@@ -61,7 +55,6 @@ void Set_NRF24L01_Pins(void)
61 55
 	NRF_CE_PORT &= ~(1 << NRF_CE_PIN);
62 56
 
63 57
 	/* Set the interrupt pin */
64
-	/* TODO: PCINT21 -> PCINT2 */
65 58
 	NRF_IRQ_DDR &= ~(1 << NRF_IRQ_PIN); // Set the pin as input
66 59
 	NRF_IRQ_PORT |= (1 << NRF_IRQ_PORT); // Enable the pullup for the pin
67 60
 }
@@ -247,7 +240,7 @@ bool NRF24L01_Receive_Message(uint8_t *buffer, uint8_t duration)
247 240
 
248 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 246
 	/* Reset the interrupts */

+ 0
- 2
weather-sensor/firmware/nrf24l01_definitions.h Visa fil

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

+ 1
- 4
weather-sensor/firmware/radio.c Visa fil

@@ -5,7 +5,7 @@
5 5
 
6 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 10
 	memset((uint8_t*)packet, 0, PACKET_LENGTH); //Reinitialize the buffer with zeros
11 11
 
@@ -61,9 +61,6 @@ bool Read_Salt_Message(PACKET * packet, uint64_t * salt)
61 61
 	uint16_t crcRemainder = 0xFFFF;
62 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 64
 	baseStationSalt = packet->salt;
68 65
 	Decrypt((uint32_t*)packet->payload.buffer,
69 66
 	        PACKET_PAYLOAD_BUFFER_LENGTH + sizeof(packet->crc),

+ 1
- 1
weather-sensor/firmware/radio.h Visa fil

@@ -6,7 +6,7 @@
6 6
 #include "bme280_defs.h"
7 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 10
 bool Read_Salt_Message(PACKET * packet, uint64_t * salt);
11 11
 bool Send_Report_Message(PACKET * packet, uint64_t * salt, struct bme280_data * sensorData);
12 12
 

Loading…
Avbryt
Spara