Merge pull request #67 from eclipse/develop

Add    João Eduardo's contribution instead of him.
This commit is contained in:
Tomoaki Yamaguchi
2017-07-04 10:42:58 +09:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
### **step1. Build the gateway** ### **step1. Build the gateway**
```` ````
$ git clone -b gateway https://github.com/eclipse/paho.mqtt-sn.embedded-c $ git clone https://github.com/eclipse/paho.mqtt-sn.embedded-c
$ cd paho.mqtt-sn.embedded-c/MQTTSNGateway $ cd paho.mqtt-sn.embedded-c/MQTTSNGateway
$ make $ make
$ make install $ make install

View File

@@ -120,7 +120,7 @@ int SensorNetwork::read(uint8_t* buf, uint16_t bufLen)
int SensorNetwork::initialize(void) int SensorNetwork::initialize(void)
{ {
char param[MQTTSNGW_PARAM_MAX]; char param[MQTTSNGW_PARAM_MAX];
uint16_t baudrate = 9600; uint32_t baudrate = 9600;
uint8_t apimode = 2; uint8_t apimode = 2;
if (theProcess->getParam("ApiMode", param) == 0) if (theProcess->getParam("ApiMode", param) == 0)
@@ -134,7 +134,7 @@ int SensorNetwork::initialize(void)
if (theProcess->getParam("Baudrate", param) == 0) if (theProcess->getParam("Baudrate", param) == 0)
{ {
baudrate = (uint16_t)atoi(param); baudrate = (uint32_t)atoi(param);
} }
_description += ", Baudrate "; _description += ", Baudrate ";
sprintf(param ,"%d", baudrate); sprintf(param ,"%d", baudrate);