Fix: Default to empty sensor description

This commit is contained in:
Henrik Ekblad
2015-06-09 23:47:44 +02:00
parent f642ec8bf6
commit e111d64c31
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -484,7 +484,7 @@ void MySensor::sendBatteryLevel(uint8_t value, bool enableAck) {
}
void MySensor::present(uint8_t childSensorId, uint8_t sensorType, bool enableAck, const char*description) {
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(description));
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(childSensorId==NODE_SENSOR_ID?LIBRARY_VERSION:description));
}
void MySensor::sendSketchInfo(const char *name, const char *version, bool enableAck) {
+1 -1
View File
@@ -180,7 +180,7 @@ class MySensor
* @param ack Set this to true if you want destination node to send ack back to this node. Default is not to request any ack.
* @param description A textual description of the sensor. Defaults to library version.
*/
void present(uint8_t sensorId, uint8_t sensorType, bool ack=false, const char *description=LIBRARY_VERSION);
void present(uint8_t sensorId, uint8_t sensorType, bool ack=false, const char *description="");
/**
* Sends sketch meta information to the gateway. Not mandatory but a nice thing to do.