From 51d22c6936707e5f594786c473da0b32789f8bcc Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Wed, 10 Jun 2015 23:56:40 +0200 Subject: [PATCH] Change argument order in presentation --- libraries/MySensors/MySensor.cpp | 2 +- libraries/MySensors/MySensor.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/MySensors/MySensor.cpp b/libraries/MySensors/MySensor.cpp index b953fd7..010cd19 100644 --- a/libraries/MySensors/MySensor.cpp +++ b/libraries/MySensors/MySensor.cpp @@ -483,7 +483,7 @@ 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, const char*description) { +void MySensor::present(uint8_t childSensorId, uint8_t sensorType, const char*description, bool enableAck) { sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(childSensorId==NODE_SENSOR_ID?LIBRARY_VERSION:description)); } diff --git a/libraries/MySensors/MySensor.h b/libraries/MySensors/MySensor.h index 1cda7d1..8842a6f 100644 --- a/libraries/MySensors/MySensor.h +++ b/libraries/MySensors/MySensor.h @@ -177,10 +177,10 @@ class MySensor * * @param sensorId Select a unique sensor id for this sensor. Choose a number between 0-254. * @param sensorType The sensor type. See sensor typedef in MyMessage.h. - * @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. + * @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. */ - void present(uint8_t sensorId, uint8_t sensorType, bool ack=false, const char *description=""); + void present(uint8_t sensorId, uint8_t sensorType, const char *description="", bool ack=false); /** * Sends sketch meta information to the gateway. Not mandatory but a nice thing to do.