Added optional description when presenting sensors.

This commit is contained in:
Henrik Ekblad
2015-06-09 23:05:45 +02:00
parent 387aaba46e
commit f642ec8bf6
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -483,8 +483,8 @@ void MySensor::sendBatteryLevel(uint8_t value, bool enableAck) {
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, NODE_SENSOR_ID, C_INTERNAL, I_BATTERY_LEVEL, enableAck).set(value));
}
void MySensor::present(uint8_t childSensorId, uint8_t sensorType, bool enableAck) {
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(LIBRARY_VERSION));
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));
}
void MySensor::sendSketchInfo(const char *name, const char *version, bool enableAck) {