This repository was archived by the owner on Sep 1, 2023. It is now read-only.
forked from nRF24/RF24Mesh
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRF24Mesh_config.h
44 lines (37 loc) · 2 KB
/
RF24Mesh_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include "Arduino.h"
/*** User Configuration ***/
#define MESH_MAX_CHILDREN 4 /** Set 1 to 4 (Default: 4) Restricts the maximum children per node. **/
//#define MESH_NOMASTER /** This can be set to 0 for all nodes except the master (nodeID 0) to save pgm space **/
typedef uint32_t nodeid_t;
typedef uint16_t address_t;
/***Advanced User Config***/
#define MESH_LOOKUP_TIMEOUT 3000 /** How long mesh write will retry address lookups before giving up. This is not used when sending to or from the master node. **/
#define MESH_WRITE_TIMEOUT 5550 /** UNUSED - How long mesh.write will retry failed payloads. */
#define MESH_ADDR_REQ_RES_TIMEOUT 1000
#define MESH_ADDR_CONFIRM_REPEAT_THRESH 6
#define MESH_DEFAULT_CHANNEL 97 /** Radio channel to operate on 1-127. This is normally modified by calling mesh.setChannel() */
#define MESH_RENEWAL_TIMEOUT 60000 /** How long to attempt address renewal */
#define MESH_ADDRESS_EXPIRY 20000L /** How long in millis of silence before a node is deregistered */
/**************************/
/*** Debug ***/
// #define MESH_DEBUG_MINIMAL /** Uncomment for the Master Node to print out address assignments as they are assigned */
#define MESH_DEBUG /** Uncomment to enable debug output to serial **/
/**************************/
/** Other Configuration */
#define MESH_MIN_SAVE_TIME 30000 /** Minimum time required before changing nodeID. Prevents excessive writing to EEPROM */
#define MESH_DEFAULT_ADDRESS 04444
#define MESH_MAX_ADDRESSES 255 /** Determines the max size of the array used for storing addresses on the Master Node */
// #define MESH_ADDRESS_HOLD_TIME 30000 /** How long before a released address becomes available */
#ifdef MESH_DEBUG
#if !defined (__linux) && !defined ARDUINO_SAM_DUE || defined TEENSY || defined(__ARDUINO_X86__)
#define MESH_DEBUG_SERIAL
#else
#define MESH_DEBUG_PRINTF
#endif
#endif
#ifdef MESH_DEBUG_PRINTF
#define dprint printf
#elif defined MESH_DEBUG_SERIAL
#define dprint Serial.print
#endif