From f5e810d2674c7f9cd393ef7abb220296ad229553 Mon Sep 17 00:00:00 2001 From: dragonchaser Date: Fri, 13 Mar 2026 15:44:53 +0100 Subject: [PATCH] make amulett prod ready Signed-off-by: dragonchaser --- btcontrol.ino | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/btcontrol.ino b/btcontrol.ino index e7e5a9c..16179c2 100644 --- a/btcontrol.ino +++ b/btcontrol.ino @@ -57,11 +57,11 @@ void Vibrate(); #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) // 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 -#define USE_SERIAL true -#define SERIAL_SPEED 115200 +#define USE_SERIAL false +#define SERIAL_SPEED 9600 // CONSTS static const PROGMEM std::map overrideColors = { @@ -161,7 +161,8 @@ uint8_t vibrationCount = 0; class AdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks { 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; }