[CC1101] Swapped frequency deviation and rx bandwdith in begin method

pull/113/head
jgromes 2020-02-11 14:26:14 +01:00
rodzic 106012b323
commit 3bb70ff361
9 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -34,8 +34,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc.begin();
if (state == ERR_NONE) {

Wyświetl plik

@ -32,8 +32,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc.begin();
if (state == ERR_NONE) {

Wyświetl plik

@ -37,8 +37,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc.begin();
if (state == ERR_NONE) {
@ -111,7 +111,7 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = cc.receive(byteArr, 8);
int state = cc.readData(byteArr, 8);
*/
if (state == ERR_NONE) {

Wyświetl plik

@ -43,8 +43,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc1.begin();
if (state == ERR_NONE) {
@ -59,10 +59,10 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 434.0 MHz
// bit rate: 32.0 kbps
// Rx bandwidth: 250.0 kHz
// frequency deviation: 60.0 kHz
// Rx bandwidth: 250.0 kHz
// sync word: 0xD391
state = cc2.begin(434.0, 32.0, 250.0, 60.0);
state = cc2.begin(434.0, 32.0, 60.0, 250.0);
if (state == ERR_NONE) {
Serial.println(F("success!"));
} else {

Wyświetl plik

@ -32,8 +32,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc.begin();
if (state == ERR_NONE) {

Wyświetl plik

@ -32,8 +32,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc.begin();
if (state == ERR_NONE) {

Wyświetl plik

@ -36,8 +36,8 @@ void setup() {
Serial.print(F("[CC1101] Initializing ... "));
// carrier frequency: 868.0 MHz
// bit rate: 4.8 kbps
// Rx bandwidth: 325.0 kHz
// frequency deviation: 48.0 kHz
// Rx bandwidth: 325.0 kHz
// sync word: 0xD391
int state = cc.begin();
if (state == ERR_NONE) {
@ -63,7 +63,7 @@ void setup() {
/*
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
0x78, 0xAB, 0xCD, 0xEF};
state = cc.transmit(byteArr, 8);
state = cc.startTransmit(byteArr, 8);
*/
}
@ -125,7 +125,7 @@ void loop() {
/*
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
0x78, 0xAB, 0xCD, 0xEF};
int state = cc.transmit(byteArr, 8);
int state = cc.startTransmit(byteArr, 8);
*/
// we're ready to send more packets,

Wyświetl plik

@ -9,7 +9,7 @@ CC1101::CC1101(Module* module) : PhysicalLayer(CC1101_FREQUENCY_STEP_SIZE, CC110
_syncWordLength = 2;
}
int16_t CC1101::begin(float freq, float br, float rxBw, float freqDev, int8_t power, uint8_t preambleLength) {
int16_t CC1101::begin(float freq, float br, float freqDev, float rxBw, int8_t power, uint8_t preambleLength) {
// set module properties
_mod->SPIreadCommand = CC1101_CMD_READ;
_mod->SPIwriteCommand = CC1101_CMD_WRITE;

Wyświetl plik

@ -525,17 +525,17 @@ class CC1101: public PhysicalLayer {
\param br Bit rate to be used in kbps. Defaults to 4.8 kbps.
\param rxBw Receiver bandwidth in kHz. Defaults to 325.0 kHz.
\param freqDev Frequency deviation from carrier frequency in kHz Defaults to 48.0 kHz.
\param rxBw Receiver bandwidth in kHz. Defaults to 325.0 kHz.
\param power Output power in dBm. Defaults to 0 dBm.
\param preambleLength Preamble Length in bytes. Defaults to 4 bytes.
\returns \ref status_codes
*/
int16_t begin(float freq = 868.0, float br = 4.8, float rxBw = 325.0, float freqDev = 48.0, int8_t power = 0, uint8_t preambleLength = 4);
int16_t begin(float freq = 868.0, float br = 4.8, float freqDev = 48.0, float rxBw = 325.0, int8_t power = 0, uint8_t preambleLength = 4);
/*!
\brief Blocking binary transmit method.