Default channel should be 76 (not the presumed 70)

This commit is contained in:
Henrik Ekblad
2014-03-04 19:11:54 +01:00
parent a5422954e6
commit 0506187e27
4 changed files with 429 additions and 430 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class Gateway : public Relay
Gateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er);
/* Use this and pass a function that should be called when you want to process commands that arrive from radio network */
void begin(rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=70, void (*dataCallback)(char *)=NULL);
void begin(rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=76, void (*dataCallback)(char *)=NULL);
void processRadioMessage();
void parseAndSend(char *inputString);
+1 -1
View File
@@ -39,7 +39,7 @@ class Relay : public Sensor
*/
Relay(uint8_t _cepin = 9, uint8_t _cspin = 10);
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=70);
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=76);
boolean messageAvailable();
boolean send(message_s message, int length);
+2 -2
View File
@@ -22,7 +22,7 @@
#include <avr/pgmspace.h>
#include <stdarg.h>
//#define DEBUG
#define DEBUG
#ifdef DEBUG
#define debug(x,...) debugPrint(x, ##__VA_ARGS__)
@@ -136,7 +136,7 @@ class Sensor : public RF24
* @param paLevel Radio PA Level for this sensor. Default RF24_PA_MAX
* @param channel Radio channel. Default RF24_PA_MAX
*/
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=70);
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=76);
uint8_t getRadioId();
@@ -10,7 +10,7 @@
#define RELAY_ON 0
#define RELAY_OFF 1
Relay gw;
Sensor gw;
void setup()
{
@@ -20,7 +20,6 @@ void setup()
for (int i=0; i<NUMBER_OF_RELAYS;i++) {
gw.sendSensorPresentation(RELAY_1+i, S_LIGHT);
}
// Fetch relay status
for (int i=0; i<NUMBER_OF_RELAYS;i++) {
// Make sure relays are off when starting up