Skip to content

Commit

Permalink
fix #270: Sigfox configure support
Browse files Browse the repository at this point in the history
  • Loading branch information
dhineshkumarmcci committed Feb 9, 2021
1 parent ccdce72 commit fd2fc6b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/CatenaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Copyright notice:

#include <Arduino_LoRaWAN.h>

#include <MCCI_Sigfox.h>
#include <Catena_Sigfox_wapper.h>

#if ! (defined(ARDUINO_LORAWAN_VERSION) && ARDUINO_LORAWAN_VERSION >= ARDUINO_LORAWAN_VERSION_CALC(0,6,0,20))
Expand Down
5 changes: 2 additions & 3 deletions src/CatenaFeatherM0.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Copyright notice:

#include <Arduino_LoRaWAN_network.h>

#include <MCCI_Sigfox.h>
#include <Catena_Sigfox_wapper.h>

namespace McciCatena {
Expand Down Expand Up @@ -126,7 +125,7 @@ class CatenaFeatherM0::Sigfox : public MCCI_Catena_Sigfox,
public cPollableObject
{
public:
using Super = MCCI_Sigfox;
using Super = MCCI_Catena_Sigfox;

/*
|| the constructor.
Expand All @@ -140,7 +139,7 @@ class CatenaFeatherM0::Sigfox : public MCCI_Catena_Sigfox,
*/
virtual bool begin(CatenaFeatherM0 *pCatena);

virtual void poll() { sigfox_loop(); };
virtual void poll() { this->Super::loop(); };

protected:
/*
Expand Down
3 changes: 1 addition & 2 deletions src/CatenaStm32L0.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Copyright notice:

#include <Arduino_LoRaWAN_network.h>

#include <MCCI_Sigfox.h>
#include <Catena_Sigfox_wapper.h>

namespace McciCatena {
Expand Down Expand Up @@ -181,7 +180,7 @@ class CatenaStm32L0::Sigfox : public MCCI_Catena_Sigfox,
*/
virtual bool begin(CatenaStm32L0 *pCatena);

virtual void poll() { sigfox_loop(); };
virtual void poll() { this->Super::loop(); };

protected:
/*
Expand Down
11 changes: 2 additions & 9 deletions src/lib/CatenaBase_GetSigfoxConfiguringInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,8 @@ CatenaBase::GetSigfoxConfiguringInfo(
framDevID.get(pInfo->DevID, sizeof(pInfo->DevID));
framPAC.get(pInfo->PAC, sizeof(pInfo->PAC));
framKey.get(pInfo->Key, sizeof(pInfo->Key));
framRegion.get(pInfo->Region, sizeof(pInfo->Region));
framEncryption.get(pInfo->Encryption, sizeof(pInfo->Encryption));

/* copy the data */
/* framSigfoxCredentials.get(pInfo->AppKey, sizeof(pInfo->AppKey));
framSigfoxCredentials.get(pInfo->DevEUI, sizeof(pInfo->DevEUI));
framSigfoxCredentials.get(pInfo->AppEUI, sizeof(pInfo->AppEUI));
framSigfoxCredentials.get(pInfo->DevEUI, sizeof(pInfo->DevEUI));
framSigfoxCredentials.get(pInfo->AppEUI, sizeof(pInfo->AppEUI)); */
framRegion.get(&pInfo->Region, sizeof(pInfo->Region));
framEncryption.get(&pInfo->Encryption, sizeof(pInfo->Encryption));

return true;
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/CatenaBase_addSigfoxCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Copyright notice:

#include "CatenaBase.h"

#include <MCCI_Sigfox.h>
#include <Catena_Sigfox_wapper.h>

#include "Catena_Log.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ CatenaWingFram2k::Sigfox::begin(
)
{
gLog.printf(gLog.kTrace, "+CatenaWingFram2k::Sigfox::begin()\n");
MCCI_Sigfox m_Sigfox;

this->m_pCatena = pParent;

/* first set up command processor -- just in case begin() failed */
pParent->addSigfoxCommands();

/* call the base begin */
if (! m_Sigfox.isReady())
if (! this->MCCI_Catena_Sigfox::begin())
{
gLog.printf(
gLog.kError,
Expand Down
3 changes: 1 addition & 2 deletions src/lib/samd/featherm0/catenafeatherm0_sigfox_begin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ bool CatenaFeatherM0::Sigfox::begin(
)
{
gLog.printf(gLog.kTrace, "+CatenaFeatherM0::Sigfox::begin()\n");
MCCI_Sigfox m_Sigfox;

this->m_pCatena = pParent;

/* first call the base begin */
if (! m_Sigfox.isReady())
if (! this->MCCI_Catena_Sigfox::begin())
{
gLog.printf(
gLog.kBug,
Expand Down
5 changes: 2 additions & 3 deletions src/lib/stm32/stm32l0/CatenaStm32L0_Sigfox_begin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,19 @@ bool CatenaStm32L0::Sigfox::begin(
)
{
gLog.printf(gLog.kTrace, "+CatenaStm32L0::Sigfox::begin()\n");
MCCI_Sigfox m_Sigfox;

this->m_pCatena = pParent;

/* first set up command processor -- just in case begin() failed */
pParent->addSigfoxCommands();

/* call the base begin */
if (! m_Sigfox.isReady())
if (! this->MCCI_Catena_Sigfox::begin())
{
gLog.printf(
gLog.kError,
"?CatenaStm32L0::Sigfox::begin:"
" MCCI_Sigfox:begin failed\n"
" MCCI_Catena_Sigfox:begin failed\n"
);
return false;
}
Expand Down

0 comments on commit fd2fc6b

Please sign in to comment.