make amulett prod ready
Signed-off-by: dragonchaser <christian@boltares.de>
This commit is contained in:
@@ -57,11 +57,11 @@ void Vibrate();
|
|||||||
#define MAX_MONITOR_DEVICES 7
|
#define MAX_MONITOR_DEVICES 7
|
||||||
// Minimum transmit power the device needs to be recognice (this defines the min proximity needed for the device to be used)
|
// Minimum transmit power the device needs to be recognice (this defines the min proximity needed for the device to be used)
|
||||||
// TODO: add a table here that defines distance in meters for scenarios where the device is in plain sight
|
// TODO: add a table here that defines distance in meters for scenarios where the device is in plain sight
|
||||||
#define MIN_RSSI_POWER -50
|
#define MIN_RSSI_POWER -100
|
||||||
|
|
||||||
// Use Serial interface for debugging true|false
|
// Use Serial interface for debugging true|false
|
||||||
#define USE_SERIAL true
|
#define USE_SERIAL false
|
||||||
#define SERIAL_SPEED 115200
|
#define SERIAL_SPEED 9600
|
||||||
|
|
||||||
// CONSTS
|
// CONSTS
|
||||||
static const PROGMEM std::map<String, String> overrideColors = {
|
static const PROGMEM std::map<String, String> overrideColors = {
|
||||||
@@ -161,7 +161,8 @@ uint8_t vibrationCount = 0;
|
|||||||
|
|
||||||
class AdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks {
|
class AdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks {
|
||||||
void onResult(BLEAdvertisedDevice advertisedDevice) {
|
void onResult(BLEAdvertisedDevice advertisedDevice) {
|
||||||
if (advertisedDevice.getRSSI() > MIN_RSSI_POWER) {
|
if (advertisedDevice.getRSSI() < MIN_RSSI_POWER) {
|
||||||
|
Serial.printf("Ignoring device: %s RSSI: %d TX Power: %d, too far away.\n", advertisedDevice.getAddress().toString().c_str(), advertisedDevice.getRSSI(), advertisedDevice.getTXPower());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user