Skip to content

Commit 40f4deb

Browse files
authored
Code maintenance (#1309)
* Fix issues after CPPcheck 1.88 update * Code maintenance
1 parent 529485c commit 40f4deb

37 files changed

+1239
-727
lines changed
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
// inline suppression doesn't work
22
*:hal/architecture/NRF5/drivers/Flash.cpp
3-
*:drivers/NVM/NVRAM.cpp
4-
*:hal\transport\RFM69\driver\old\RFM69_old.cpp
3+
*:hal/transport/RFM69/driver/old/RFM69_old.cpp
54
// 3rd party
6-
*:hal/architecture/Linux/drivers/BCM/bcm2835.c
7-
*:hal/architecture/Linux/drivers/core/Client.h
8-
*:hal/architecture/Linux/drivers/core/EthernetClient.cpp
9-
*:hal/architecture/Linux/drivers/core/EthernetClient.h
10-
*:hal/architecture/Linux/drivers/core/EthernetServer.cpp
11-
*:hal/architecture/Linux/drivers/core/EthernetServer.h
12-
*:hal/architecture/Linux/drivers/core/SerialPort.h
13-
*:hal/architecture/Linux/drivers/core/StdInOutStream.h
5+
*:hal/architecture/Linux/*
6+
*:drivers/*

Doxyfile

Lines changed: 406 additions & 186 deletions
Large diffs are not rendered by default.

MyConfig.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
/**
2121
* @file MyConfig.h
2222
* @ingroup MyConfigGrp
23-
*
2423
* @brief MySensors specific configuration flags.
25-
*
24+
* @{
2625
* Set these in your sketch before including MySensors.h to customize the library to your needs.
2726
* If the sketch does not define these flags, they will get default values where applicable.
2827
*/
@@ -1658,7 +1657,7 @@
16581657
#ifndef MY_DEFAULT_LED_BLINK_PERIOD
16591658
#define MY_DEFAULT_LED_BLINK_PERIOD 300
16601659
#endif
1661-
/** @}*/ // End of lEDSettingGrpPub group
1660+
/** @}*/ // End of LEDSettingGrpPub group
16621661

16631662
/**
16641663
* @defgroup SecuritySettingGrpPub Security

core/MyGatewayTransport.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,25 @@ inline void gatewayTransportProcess(void)
2929
{
3030
if (gatewayTransportAvailable()) {
3131
_msg = gatewayTransportReceive();
32-
if (_msg.destination == GATEWAY_ADDRESS) {
32+
if (_msg.getDestination() == GATEWAY_ADDRESS) {
3333

3434
// Check if sender requests an echo
35-
if (mGetRequestEcho(_msg)) {
35+
if (_msg.getRequestEcho()) {
3636
// Copy message
3737
_msgTmp = _msg;
3838
// Reply without echo flag, otherwise we would end up in an eternal loop
39-
mSetRequestEcho(_msgTmp,
40-
false);
41-
mSetEcho(_msgTmp, true);
42-
_msgTmp.sender = getNodeId();
43-
_msgTmp.destination = _msg.sender;
39+
_msgTmp.setRequestEcho(false);
40+
_msgTmp.setEcho(true);
41+
_msgTmp.setSender(getNodeId());
42+
_msgTmp.setDestination(_msg.getSender());
4443
gatewayTransportSend(_msgTmp);
4544
}
46-
if (mGetCommand(_msg) == C_INTERNAL) {
47-
if (_msg.type == I_VERSION) {
45+
if (_msg.getCommand() == C_INTERNAL) {
46+
if (_msg.getType() == I_VERSION) {
4847
// Request for version. Create the response
4948
gatewayTransportSend(buildGw(_msgTmp, I_VERSION).set(MYSENSORS_LIBRARY_VERSION));
5049
#ifdef MY_INCLUSION_MODE_FEATURE
51-
} else if (_msg.type == I_INCLUSION_MODE) {
50+
} else if (_msg.getType() == I_INCLUSION_MODE) {
5251
// Request to change inclusion mode
5352
inclusionModeSet(atoi(_msg.data) == 1);
5453
#endif

core/MyGatewayTransportMQTTClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ bool gatewayTransportSend(MyMessage &message)
119119
char *topic = protocolMyMessage2MQTT(MY_MQTT_PUBLISH_TOPIC_PREFIX, message);
120120
GATEWAY_DEBUG(PSTR("GWT:TPS:TOPIC=%s,MSG SENT\n"), topic);
121121
#if defined(MY_MQTT_CLIENT_PUBLISH_RETAIN)
122-
const bool retain = mGetCommand(message) == C_SET ||
123-
(mGetCommand(message) == C_INTERNAL && message.type == I_BATTERY_LEVEL);
122+
const bool retain = message.getCommand() == C_SET ||
123+
(message.getCommand() == C_INTERNAL && message.getType() == I_BATTERY_LEVEL);
124124
#else
125125
const bool retain = false;
126126
#endif /* End of MY_MQTT_CLIENT_PUBLISH_RETAIN */

0 commit comments

Comments
 (0)