Skip to content

Commit 51d22c6

Browse files
committed
Change argument order in presentation
1 parent 52916cb commit 51d22c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/MySensors/MySensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ void MySensor::sendBatteryLevel(uint8_t value, bool enableAck) {
483483
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, NODE_SENSOR_ID, C_INTERNAL, I_BATTERY_LEVEL, enableAck).set(value));
484484
}
485485

486-
void MySensor::present(uint8_t childSensorId, uint8_t sensorType, bool enableAck, const char*description) {
486+
void MySensor::present(uint8_t childSensorId, uint8_t sensorType, const char*description, bool enableAck) {
487487
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(childSensorId==NODE_SENSOR_ID?LIBRARY_VERSION:description));
488488
}
489489

libraries/MySensors/MySensor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ class MySensor
177177
*
178178
* @param sensorId Select a unique sensor id for this sensor. Choose a number between 0-254.
179179
* @param sensorType The sensor type. See sensor typedef in MyMessage.h.
180-
* @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.
181180
* @param description A textual description of the sensor.
181+
* @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.
182182
*/
183-
void present(uint8_t sensorId, uint8_t sensorType, bool ack=false, const char *description="");
183+
void present(uint8_t sensorId, uint8_t sensorType, const char *description="", bool ack=false);
184184

185185
/**
186186
* Sends sketch meta information to the gateway. Not mandatory but a nice thing to do.

0 commit comments

Comments
 (0)