1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00

- Split most of the EspnowMeshBackend code into utility files and the new ConditionalPrinter, EspnowDatabase, EspnowConnectionManager, EspnowTransmitter and EspnowEncryptionBroker classes.

- Improve mutex handling.

- Move verifyEncryptionRequestHmac function from JsonTranslator to EspnowEncryptionBroker.

- Remove UtilityMethods.cpp.
This commit is contained in:
Anders
2020-05-15 20:33:08 +02:00
parent 3f5495bb3d
commit 40e1f02ffb
30 changed files with 3181 additions and 2263 deletions

View File

@ -31,8 +31,6 @@ namespace
std::shared_ptr<bool> MeshBackendBase::_scanMutex = std::make_shared<bool>(false);
bool MeshBackendBase::_printWarnings = true;
MeshBackendBase::MeshBackendBase(const requestHandlerType requestHandler, const responseHandlerType responseHandler, const networkFilterType networkFilter, const MeshBackendType classType)
{
setRequestHandler(requestHandler);
@ -53,6 +51,22 @@ void MeshBackendBase::setClassType(const MeshBackendType classType)
MeshBackendType MeshBackendBase::getClassType() const {return _classType;}
void MeshBackendBase::setVerboseModeState(const bool enabled) { _conditionalPrinter.setVerboseModeState(enabled); }
bool MeshBackendBase::verboseMode() const { return _conditionalPrinter.verboseMode(); }
void MeshBackendBase::verboseModePrint(const String &stringToPrint, const bool newline) const
{
_conditionalPrinter.verboseModePrint(stringToPrint, newline);
}
void MeshBackendBase::setPrintWarnings(const bool printEnabled) { ConditionalPrinter::setPrintWarnings(printEnabled); }
bool MeshBackendBase::printWarnings() {return ConditionalPrinter::printWarnings();}
void MeshBackendBase::warningPrint(const String &stringToPrint, const bool newline)
{
ConditionalPrinter::warningPrint(stringToPrint, newline);
}
void MeshBackendBase::activateAP()
{
// Deactivate active AP to avoid two servers using the same port, which can lead to crashes.