Skip to content

Commit

Permalink
udpate class constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nat committed May 10, 2018
1 parent eaf093a commit e6df855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/AT-bridge_serial2/AT-bridge_serial2.ino
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#include <Arduino.h>
#include <CMMC_NB_IoT.h>

CMMC_NB_IoT nb(&Serial2);
CMMC_NB_IoT nb;
CMMC_AT_Bridge &Bridge = nb.Bridge;

void setup()
{
Serial.begin(57600);
Serial2.begin(9600);
Serial.println("Chiang Mai Maker Club's AT-Bridge engine is started.");

Bridge.init(&Serial, &Serial2);

}
Expand Down
4 changes: 2 additions & 2 deletions src/CMMC_NB_IoT.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CMMC_NB_IoT
{
public:
CMMC_AT_Bridge Bridge;
CMMC_NB_IoT(Stream *s);
CMMC_NB_IoT(Stream *s = NULL);

typedef struct {
char firmware[180];
Expand All @@ -34,7 +34,7 @@ class CMMC_NB_IoT

typedef void(*deviceInfoCb_t)(DeviceInfo);
~CMMC_NB_IoT();
void begin(Stream *s = 0, uint8_t timeout = 6);
void begin(Stream *s = 0, uint8_t timeout = 5);
void onDeviceReady(deviceInfoCb_t cb);
void onConnecting(voidCb_t cb);
void onConnected(voidCb_t cb);
Expand Down

0 comments on commit e6df855

Please sign in to comment.