Henrik and others,
We’re looking for feedback on making it easier for users to centralize the configuration of the MySensors network configuration (e.g. RF24 Channel, etc.). What if we were to add an include file called MySensorsNetConfig.h that lives in either the Arduino/libraries/MySensors or Arduino/libraries/MySensors/examples and defines the following parameters for centralized change.
/***
* Configure Sensor Network RF parameters
**/
#define RF24_CHANNEL=76 //Which RF channel to communicate on, 0-127
#define RF24_DATARATE=RF24_2MBPS //RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
#define RF24_PA_LEVEL=RF24_PA_MAX //RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_MED=-6dBM, and RF24_PA_HIGH=0dBm
/***
* Enable/disable debug logging
**/
//#define DEBUG
Every sketch compiled and uploaded would use this file and hence configuration parameters so users would not have to override the constructors or begin methods in each sketch. Changing the channel would be as simple as editing the MySensorsNetConfig.h to use a different channel, re-upload each sketch.
Thoughts? Value? Better mechanism? Location for the include file?
Are there any other configuration parameters that people would like to centralize?