diff --git a/wh1080_rf.c b/wh1080_rf.c index 0ade519..95ef1db 100755 --- a/wh1080_rf.c +++ b/wh1080_rf.c @@ -115,9 +115,8 @@ uint16_t cmd_dcycle = CMD_LOWDUTY|0x00; uint16_t cmd_fifo = CMD_FIFO|0x00; - uint16_t cmd_config = CMD_CONFIG|BAND_433|LOAD_CAP_12C0|BW_67; - uint16_t cmd_rcon = (CMD_RCON|RX_EN|VDI_DRSSI|LNA_0|RSSI_91); - //uint16_t cmd_rcon = (CMD_RCON|RX_EN|VDI_DRSSI|LNA_14|RSSI_97); + uint16_t cmd_config = CMD_CONFIG|BAND_433|LOAD_CAP_12C0|BW_400; + uint16_t cmd_rcon = (CMD_RCON|RX_EN|VDI_DRSSI|LNA_6|RSSI_85); uint16_t cmd_dfilter = (CMD_DFILTER|CR_LOCK_FAST|FILTER_OOK); #endif @@ -205,10 +204,7 @@ |TIMER_ARM_C_FPS(0xf9); // Init GPIO21 (on pin 13) as input (DATA), GPIO22 (pin 15) as output (nRES) - //*(gpio.addr + 2) = (*(gpio.addr + 2) & 0xfffffe07)|(0x001 << 6); - - // Init GPIO27 - *(gpio.addr + 2) = (*(gpio.addr + 2) & 0xff1fffff); + *(gpio.addr + 2) = (*(gpio.addr + 2) & 0xfffffe07)|(0x001 << 6); #ifdef RFM01 printf("Initialising RFM01\n"); @@ -328,7 +324,7 @@ do { // Read the GPIO pin for clocked DATA value - status = ((*(gpio.addr + 13)) >> 27) & 1; + status = ((*(gpio.addr + 13)) >> 21) & 1; rssi = status; rssitime = TIMER_ARM_COUNT; // Check if the pin transitioned @@ -370,7 +366,7 @@ // LED on *(gpio.addr + (0x1c >> 2)) = 1 << 22; - strobe_afc(fd); // lock frequency to good signal + //strobe_afc(fd); // lock frequency to good signal int b; uint8_t byte; diff --git a/wh1080_rf.h b/wh1080_rf.h index 71808e6..3371cff 100755 --- a/wh1080_rf.h +++ b/wh1080_rf.h @@ -1,5 +1,5 @@ -#define USE_BMP085 +//#define USE_BMP085 //#define ALTITUDE_M 210.0f #define ALTITUDE_M 6.0f