Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "onMillis" and "currentMillis" variables data types to align millis() return type #69

Open
wants to merge 1 commit into
base: 2.5
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ratgdo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ void IRAM_ATTR isrObstruction(){

void obstructionLoop(){
if(!obstructionSensorDetected) return;
long currentMillis = millis();
unsigned long currentMillis = millis();
static unsigned long lastMillis = 0;

// the obstruction sensor has 3 states: clear (HIGH with LOW pulse every 7ms), obstructed (HIGH), asleep (LOW)
Expand Down Expand Up @@ -670,8 +670,8 @@ void pullLow(){

void blink(bool trigger){
if(LED_BUILTIN == OUTPUT_GDO) return;
static unsigned int onMillis = 0;
unsigned int currentMillis = millis();
static unsigned long onMillis = 0;
unsigned long currentMillis = millis();

if(trigger){
digitalWrite(LED_BUILTIN,LOW);
Expand Down Expand Up @@ -818,4 +818,4 @@ void toggleLock(){
transmit(txSP2RollingCode,SECPLUS2_CODE_LEN);
writeCounterToFlash("rolling",rollingCodeCounter);
}
}
}