Fix bug preventing msgs from GW-attached sensors (#698)
This commit is contained in:
+18
-12
@@ -223,29 +223,35 @@ void presentNode(void)
|
|||||||
|
|
||||||
uint8_t getNodeId(void)
|
uint8_t getNodeId(void)
|
||||||
{
|
{
|
||||||
#if defined(MY_SENSOR_NETWORK)
|
uint8_t result = VALUE_NOT_DEFINED;
|
||||||
return transportGetNodeId();
|
#if defined(MY_GATEWAY_FEATURE)
|
||||||
#else
|
result = GATEWAY_ADDRESS;
|
||||||
return 0xFF;
|
#elif defined(MY_SENSOR_NETWORK)
|
||||||
|
result = transportGetNodeId();
|
||||||
#endif
|
#endif
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t getParentNodeId(void)
|
uint8_t getParentNodeId(void)
|
||||||
{
|
{
|
||||||
#if defined(MY_SENSOR_NETWORK)
|
uint8_t result = VALUE_NOT_DEFINED;
|
||||||
return transportGetParentNodeId();
|
#if defined(MY_GATEWAY_FEATURE)
|
||||||
#else
|
result = VALUE_NOT_DEFINED; // GW doesn't have a parent
|
||||||
return 0xFF;
|
#elif defined(MY_SENSOR_NETWORK)
|
||||||
|
result = transportGetParentNodeId();
|
||||||
#endif
|
#endif
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t getDistanceGW(void)
|
uint8_t getDistanceGW(void)
|
||||||
{
|
{
|
||||||
#if defined(MY_SENSOR_NETWORK)
|
uint8_t result = VALUE_NOT_DEFINED;
|
||||||
return transportGetDistanceGW();
|
#if defined(MY_GATEWAY_FEATURE)
|
||||||
#else
|
result = 0;
|
||||||
return 0xFF;
|
#elif defined(MY_SENSOR_NETWORK)
|
||||||
|
result = transportGetDistanceGW();
|
||||||
#endif
|
#endif
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
controllerConfig_t getConfig(void)
|
controllerConfig_t getConfig(void)
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
#define MY_SLEEP_NOT_POSSIBLE ((int8_t)-2) //!< Sleeping not possible
|
#define MY_SLEEP_NOT_POSSIBLE ((int8_t)-2) //!< Sleeping not possible
|
||||||
#define INTERRUPT_NOT_DEFINED ((uint8_t)255) //!< _sleep() param: no interrupt defined
|
#define INTERRUPT_NOT_DEFINED ((uint8_t)255) //!< _sleep() param: no interrupt defined
|
||||||
#define MODE_NOT_DEFINED ((uint8_t)255) //!< _sleep() param: no mode defined
|
#define MODE_NOT_DEFINED ((uint8_t)255) //!< _sleep() param: no mode defined
|
||||||
|
#define VALUE_NOT_DEFINED ((uint8_t)255) //!< Value not defined
|
||||||
|
|
||||||
|
|
||||||
#ifdef MY_DEBUG
|
#ifdef MY_DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user