Skip to content

Commit 41452c2

Browse files
committed
Remove unused vars
1 parent 65e6bc0 commit 41452c2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pilight-usb-nano.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ volatile uint16_t codes[BUFFER_SIZE] = {0}; // Fill to 0 // Buffer to st
4747
volatile uint16_t plstypes[MAX_PULSE_TYPES] = {0}; // Fill to 0 // Buffer to store pulse types (RX and TX)
4848
volatile uint32_t new_counter = 0; // Global time counter to store initial pulse micros(). Replaces global ten_us_counter.
4949

50-
volatile uint8_t valid_buffer = 0x00, r = 0, q = 0, rawlen = 0, nrpulses = 0;
50+
volatile uint8_t q = 0; // Index of data buffer
51+
volatile uint8_t rawlen = 0; // Flag to ensure to call broadcast() after reveive two same lenght pulse train
52+
volatile uint8_t nrpulses = 0; // Index of pulse lenght buffer
5153

5254
void ISR_RX(); // Generic ISR function declaration for RF RX pulse interrupt handler instead specific AVR ISR(vector, attributes)
5355

@@ -144,8 +146,9 @@ void receive() {
144146
}
145147
digitalWrite(TX_PIN,LOW);
146148

147-
for(r=0;r<MAX_PULSE_TYPES;r++) {
148-
plstypes[r] = 0;
149+
// Clear pulse types array
150+
for(i=0;i<MAX_PULSE_TYPES;i++) {
151+
plstypes[i] = 0;
149152
}
150153
q = 0;
151154

0 commit comments

Comments
 (0)