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

Allow setTxIndicatorsOn to be used without USE_SERIAL defined. #38

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions src/LMIC-node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,16 @@ void setup()
LMIC_startJoining();
}

// Schedule initial doWork job for immediate execution.
os_setCallback(&doWorkJob, doWorkCallback);
#ifdef ABP_ACTIVATION
// Schedule initial doWork job for immediate execution.
//
// This is not done for OTAA activation because the job
// will be run before the join completes, but can't send
// an uplink, assuming it takes less than about 6 seconds
// to run. The EV_JOINED event already schedules the job
// to run immediately after it.
os_setCallback(&doWorkJob, doWorkCallback);
#endif
}


Expand Down
6 changes: 4 additions & 2 deletions src/LMIC-node.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ enum class ActivationMode {OTAA, ABP};
printer.println();
}
}

#endif // USE_SERIAL || USE_DISPLAY


#if defined(USE_LED) || defined(USE_DISPLAY)
void setTxIndicatorsOn(bool on = true)
{
if (on)
Expand All @@ -247,8 +250,7 @@ enum class ActivationMode {OTAA, ABP};
#endif
}
}

#endif // USE_SERIAL || USE_DISPLAY
#endif // USE_LED || USE_DISPLAY


#ifdef USE_DISPLAY
Expand Down