From 97f5383f07b13ee5111a8aadb7f2afa21079588f Mon Sep 17 00:00:00 2001 From: OmarRa15 Date: Thu, 17 Nov 2022 23:26:34 +0300 Subject: [PATCH] Change the "time" variable name The "time" name conflicts with the variable "time" in \.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\time.h:59:11 Which causes a compilation error when building the project. --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4cc31fe..638c42c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,7 @@ RF24 radio(CE, CSN); -long time; +long time_; int ledpin = 13; uint64_t promisc_addr = 0xAALL; uint8_t channel = 25; @@ -138,8 +138,8 @@ void scan() { //Serial.println(2400 + channel); radio.setChannel(channel); - time = millis(); - while (millis() - time < wait) + time_ = millis(); + while (millis() - time_ < wait) { if (radio.available()) {