Added production SensebenderGW sketch
preHwInit also added to hook into core startup before hwInit is called
This commit is contained in:
@@ -66,8 +66,11 @@ void _infiniteLoop() {
|
||||
|
||||
void _begin() {
|
||||
|
||||
if (preHwInit)
|
||||
preHwInit();
|
||||
|
||||
#if !defined(MY_DISABLED_SERIAL)
|
||||
hwInit();
|
||||
hwInit();
|
||||
#endif
|
||||
|
||||
debug(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",VER=" MYSENSORS_LIBRARY_VERSION "\n"));
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define GATEWAY_ADDRESS ((uint8_t)0) //!< Node ID for GW sketch
|
||||
#define GATEWAY_ADDRESS ((uint8_t)0) //!< Node ID for GW sketch
|
||||
#define NODE_SENSOR_ID 0xFF //!< Node child is always created/presented when a node is started
|
||||
#define MY_CORE_VERSION ((uint8_t)2) //!< core version
|
||||
#define MY_CORE_VERSION ((uint8_t)2) //!< core version
|
||||
#define MY_CORE_MIN_VERSION ((uint8_t)2) //!< min core version required for compatibility
|
||||
|
||||
#ifdef MY_DEBUG
|
||||
@@ -345,6 +345,10 @@ void presentation() __attribute__((weak));
|
||||
*/
|
||||
void before() __attribute__((weak));
|
||||
/**
|
||||
* @brief Called before any hwInitialization is done
|
||||
*/
|
||||
void preHwInit() __attribute__((weak));
|
||||
/**
|
||||
* @brief Called after node initialises but before main loop
|
||||
*/
|
||||
void setup() __attribute__((weak));
|
||||
|
||||
Reference in New Issue
Block a user