diff --git a/MySensors.h b/MySensors.h index bb596cb..b724b74 100644 --- a/MySensors.h +++ b/MySensors.h @@ -240,7 +240,7 @@ #endif #if defined(MY_TRANSPORT_DONT_CARE_MODE) - #error This directive is deprecated, use MY_TRANSPORT_RELAX instead! + #error This directive is deprecated, use MY_TRANSPORT_RELAXED instead! #endif diff --git a/core/MyLeds.cpp b/core/MyLeds.cpp index 0da6628..3138be3 100644 --- a/core/MyLeds.cpp +++ b/core/MyLeds.cpp @@ -34,16 +34,16 @@ inline void ledsInit() countRx = 0; countTx = 0; countErr = 0; - + // Setup led pins #if defined(MY_DEFAULT_RX_LED_PIN) - pinMode(MY_DEFAULT_RX_LED_PIN, OUTPUT); + hwPinMode(MY_DEFAULT_RX_LED_PIN, OUTPUT); #endif #if defined(MY_DEFAULT_TX_LED_PIN) - pinMode(MY_DEFAULT_TX_LED_PIN, OUTPUT); + hwPinMode(MY_DEFAULT_TX_LED_PIN, OUTPUT); #endif #if defined(MY_DEFAULT_ERR_LED_PIN) - pinMode(MY_DEFAULT_ERR_LED_PIN, OUTPUT); + hwPinMode(MY_DEFAULT_ERR_LED_PIN, OUTPUT); #endif prevTime = hwMillis() - LED_PROCESS_INTERVAL_MS; // Substract some, to make sure leds gets updated on first run. ledsProcess(); diff --git a/core/MySensorsCore.cpp b/core/MySensorsCore.cpp index 7a5e20a..2d2fb40 100644 --- a/core/MySensorsCore.cpp +++ b/core/MySensorsCore.cpp @@ -35,11 +35,8 @@ static coreConfig_t _coreConfig; char _convBuf[MAX_PAYLOAD*2+1]; #endif -// Callback for requested time messages -void (*_timeCallback)(unsigned long); - // Callback for transport=ok transition -void _callbackTransportOk() +void _callbackTransportOk(void) { if (!_coreConfig.presentationSent) { presentNode(); @@ -123,7 +120,7 @@ void _begin(void) { transportRegisterOkCallback(_callbackTransportOk); // Initialise transport layer transportInitialise(); - + // wait until transport is ready #if !defined(MY_TRANSPORT_RELAXED) // check if transport ready while (!isTransportReady()) { @@ -176,7 +173,7 @@ void _registerNode(void) (void)_sendRoute(build(_msgTmp, GATEWAY_ADDRESS, NODE_SENSOR_ID, C_INTERNAL, I_REGISTRATION_REQUEST).set(MY_CORE_VERSION)); } while (!wait(2000, C_INTERNAL, I_REGISTRATION_RESPONSE) && counter--); #else - _coreConfig.registered = true; + _coreConfig.nodeRegistered = true; CORE_DEBUG(PSTR("MCO:REG:NOT NEEDED\n")); #endif } diff --git a/core/MySensorsCore.h b/core/MySensorsCore.h index 0d0ab60..cf5c9f4 100644 --- a/core/MySensorsCore.h +++ b/core/MySensorsCore.h @@ -105,12 +105,11 @@ typedef struct { /** * @brief Node core configuration -* */ typedef struct { controllerConfig_t controllerConfig; //!< Controller config // 8 bit - bool nodeRegistered : 1; //!< Flag node registered + bool nodeRegistered : 1; //!< Flag node registered bool presentationSent : 1; //!< Flag presentation sent uint8_t reserved : 6; //!< reserved } coreConfig_t; diff --git a/core/MyTransport.h b/core/MyTransport.h index 3553756..f835f42 100644 --- a/core/MyTransport.h +++ b/core/MyTransport.h @@ -227,8 +227,8 @@ typedef struct { * This structure stores SM state definitions */ typedef struct { - void(*Transition)(); //!< state transition function - void(*Update)(); //!< state update function + void(*Transition)(void); //!< state transition function + void(*Update)(void); //!< state update function } transportState_t; /**