-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #323: Add infrastructure for gCatena.usingLoRaWAN()
- Loading branch information
1 parent
f821463
commit 06f3771
Showing
6 changed files
with
443 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,6 +157,9 @@ Catena::setup( | |
void | ||
) | ||
{ | ||
if (this->m_setupRun) | ||
return this->m_setupResult; | ||
|
||
/// TODO([email protected]) this should really be in begin(). | ||
delay(this->enable_3v3Boost(true)); | ||
delay(this->enable_i2cVdd(true)); | ||
|
@@ -205,8 +208,18 @@ Catena::setup( | |
#endif | ||
} | ||
|
||
// always successful | ||
return true; | ||
/* run the list of initializers */ | ||
bool fResult = true; | ||
|
||
for (auto pObject = this->m_pInitializationList; fResult && pObject != nullptr; pObject = pObject->getNext()) | ||
{ | ||
fResult = pObject->dispatch(this); | ||
} | ||
|
||
this->m_setupResult = fResult; | ||
this->m_setupRun = true; | ||
|
||
return this->m_setupResult; | ||
} | ||
|
||
#undef FUNCTION | ||
|
@@ -233,12 +246,12 @@ bool Catena::setup_banner(void) | |
if (pSketchDescription != nullptr) | ||
this->SafePrintf("%s\n", pSketchDescription); | ||
|
||
this->SafePrintf("Board: %s SYSCLK: %u MHz USB: %sabled\n", | ||
this->CatenaName(), | ||
unsigned(this->GetSystemClockRate() / (1000 * 1000)), | ||
this->get_consoleIsUsb() ? "en" : "dis" | ||
); | ||
this->SafePrintf("Enter 'help' for a list of commands.\n"); | ||
this->SafePrintf("Board: %s SYSCLK: %u MHz USB: %sabled\n", | ||
this->CatenaName(), | ||
unsigned(this->GetSystemClockRate() / (1000 * 1000)), | ||
this->get_consoleIsUsb() ? "en" : "dis" | ||
); | ||
this->SafePrintf("Enter 'help' for a list of commands.\n"); | ||
|
||
putDashes(); | ||
putDashes(0); // newline | ||
|
Oops, something went wrong.