moved comment and minor ops

This commit is contained in:
Daniel Wiegert
2014-08-17 22:04:42 +02:00
parent 3af3014178
commit 2ff7c74e99
3 changed files with 49 additions and 52 deletions
+1 -1
View File
@@ -29,6 +29,7 @@
MQTT_SEND_SUBSCRIPTION is if you want the MyMQTT to send a empty payload message to your nodes. MQTT_SEND_SUBSCRIPTION is if you want the MyMQTT to send a empty payload message to your nodes.
This can be useful if you want to send latest state back to the MQTT client. Just check if incoming This can be useful if you want to send latest state back to the MQTT client. Just check if incoming
message has any length or not. message has any length or not.
Example: if (msg.type==V_LIGHT && strlen(msg.getString())>0) otherwise the code might do strange things.
* Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/[SensorType] * Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/[SensorType]
NodeID and SensorID is uint8 (0-255) number. NodeID and SensorID is uint8 (0-255) number.
@@ -159,4 +160,3 @@ int main(void) {
} }
} }
+1 -4
View File
@@ -18,7 +18,7 @@ version 2 as published by the Free Software Foundation.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifdef DEBUG #ifdef DEBUG
//#define TCPDUMP // Dump TCP packages. #define TCPDUMP // Dump TCP packages.
#endif #endif
#define MQTT_FIRST_SENSORID 20 // If you want manually configured nodes below this value. 255 = Disable #define MQTT_FIRST_SENSORID 20 // If you want manually configured nodes below this value. 255 = Disable
@@ -54,8 +54,6 @@ version 2 as published by the Free Software Foundation.
#define MQTTQOS1 (1 << 1) #define MQTTQOS1 (1 << 1)
#define MQTTQOS2 (2 << 1) #define MQTTQOS2 (2 << 1)
#define MyTestVar F("Test")
class MyMQTT : class MyMQTT :
public MySensor { public MySensor {
public: public:
@@ -91,4 +89,3 @@ private:
#endif #endif