Merge development & Fix variable
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -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();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user