diff --git a/wh1080_rf.c b/wh1080_rf.c index 7c5914f..13f00bc 100755 --- a/wh1080_rf.c +++ b/wh1080_rf.c @@ -117,7 +117,7 @@ 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_200; + 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_85); uint16_t cmd_dfilter = (CMD_DFILTER|CR_LOCK_FAST|FILTER_OOK); #endif @@ -567,7 +567,11 @@ int direction = buf[8] & 0x0f; char *direction_str = direction_name[direction]; - + + if (device_id == 0) { + printf("Invalid station Id, zero, ignoring.\n"); + return; + } printf("Station Id: %04X\n", device_id); printf("Temperature: %0.1fC, Humidity: %d%%\n", temperature, humidity); printf("Wind speed: %0.2f m/s, Gust Speed %0.2f m/s, %s\n", wind_avg_ms, wind_gust_ms, direction_str);