Classify method.

This commit is contained in:
Henrik Ekblad
2014-08-27 21:53:57 +02:00
parent 0022e9fd16
commit 1290c68c4a
3 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ inline MyMessage& build (MyMessage &msg, uint8_t sender, uint8_t destination, ui
return msg; return msg;
} }
char *getType(char *b, const char **index) { char *MyMQTT::getType(char *b, const char **index) {
char *q = b; char *q = b;
char *p = (char *)pgm_read_ptr(index); char *p = (char *)pgm_read_ptr(index);
while (*q++ = pgm_read_byte(p++)); while (*q++ = pgm_read_byte(p++));
+2
View File
@@ -14,6 +14,7 @@ version 2 as published by the Free Software Foundation.
#include "MySensor.h" #include "MySensor.h"
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
#ifdef DEBUG #ifdef DEBUG
@@ -74,6 +75,7 @@ private:
char buffer[MQTT_MAX_PACKET_SIZE]; char buffer[MQTT_MAX_PACKET_SIZE];
char convBuf[MAX_PAYLOAD*2+1]; char convBuf[MAX_PAYLOAD*2+1];
uint8_t buffsize; uint8_t buffsize;
char *getType(char *b, const char **index);
}; };
extern void ledTimersInterrupt(); extern void ledTimersInterrupt();
+1
View File
@@ -61,6 +61,7 @@ http://forum.mysensors.org/topic/303/mqtt-broker-gateway
#include <MyMQTT.h> #include <MyMQTT.h>
#include <Ethernet.h> #include <Ethernet.h>
// * Use this for IBOARD modded to use standard MISO/MOSI/SCK, see note *1 above! // * Use this for IBOARD modded to use standard MISO/MOSI/SCK, see note *1 above!
/* /*
#define RADIO_CE_PIN 3 // radio chip enable #define RADIO_CE_PIN 3 // radio chip enable