Merge pull request #1397 from justcallmekoko/develop

Add command for findmy sound
This commit is contained in:
Just Call Me Koko
2026-07-21 12:55:52 -04:00
committed by GitHub
2 changed files with 24 additions and 0 deletions
+22
View File
@@ -294,6 +294,7 @@ void CommandLine::runCommand(String input) {
#ifdef HAS_BT
Serial.println(HELP_BT_SNIFF_CMD);
Serial.println(HELP_BT_SPAM_CMD);
Serial.println(HELP_BT_FINDMY_CMD);
Serial.println(HELP_BT_SPOOFAT_CMD);
Serial.println(HELP_BT_SKIM_CMD);
#endif
@@ -1091,6 +1092,27 @@ void CommandLine::runCommand(String input) {
#endif
}
}
else if (cmd_args.get(0) == BT_FINDMY_CMD) {
#ifdef HAS_NIMBLE_2
int index_sw = this->argSearch(&cmd_args, "-t");
if (index_sw != -1) {
int targ_index = cmd_args.get(index_sw + 1).toInt();
if (targ_index < airtags->size()) {
for (int x = 0; x < airtags->size(); x++) {
AirTag new_atx = airtags->get(x);
if (x != targ_index)
new_atx.selected = false;
else
new_atx.selected = true;
airtags->set(x, new_atx);
}
wifi_scan_obj.executeFindMySound(false);
}
}
#endif
}
else if (cmd_args.get(0) == BT_SPAM_CMD) {
int bt_type_sw = this->argSearch(&cmd_args, "-t");
if (bt_type_sw != -1) {
+2
View File
@@ -114,6 +114,7 @@ const char PROGMEM UPLOAD_CMD[] = "upload";
// Bluetooth sniff/scan
const char PROGMEM BT_SPAM_CMD[] = "blespam";
const char PROGMEM BT_FINDMY_CMD[] = "findmy";
const char PROGMEM BT_SNIFF_CMD[] = "sniffbt";
const char PROGMEM BT_SPOOFAT_CMD[] = "spoofat";
//const char PROGMEM BT_WARDRIVE_CMD[] = "btwardrive";
@@ -189,6 +190,7 @@ const char PROGMEM HELP_UPLOAD_CMD[] = "upload -d <wdg/wigle/both>";
// Bluetooth sniff/scan
const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt [-t] <airtag/flipper/flock/meta>";
const char PROGMEM HELP_BT_FINDMY_CMD[] = "findmy -t <index>";
const char PROGMEM HELP_BT_SPAM_CMD[] = "blespam -t <sourapple/applejuice/google/samsung/windows/flipper/all>";
const char PROGMEM HELP_BT_SPOOFAT_CMD[] = "spoofat -t <index>";
//const char PROGMEM HELP_BT_SOUR_APPLE_CMD[] = "sourapple";