core: add new Shearwater dive computer names

The code works ok falling back to just Perdix and Petrel 2, but
it looks confusing to the user to see an incorrect name in the
connection drop down.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-06-14 11:15:53 -07:00
parent e41d877e53
commit eb1284683a

View file

@ -43,9 +43,13 @@ struct namePattern {
const char *vendor; const char *vendor;
const char *product; const char *product;
}; };
// search is in order of this array, and as a prefix search, so more specific names
// should be added before less specific names (i.e. "Perdix 2" before "Perdix")
static struct namePattern name[] = { static struct namePattern name[] = {
// Shearwater dive computers // Shearwater dive computers
{ "Predator", "Shearwater", "Predator" }, { "Predator", "Shearwater", "Predator" },
{ "Perdix 2", "Shearwater", "Perdix 2"},
{ "Petrel 3", "Shearwater", "Petrel 3"},
// both the Petrel and Petrel 2 identify as "Petrel" as BT/BLE device // both the Petrel and Petrel 2 identify as "Petrel" as BT/BLE device
// but only the Petrel 2 is listed as available dive computer on iOS (which requires BLE support) // but only the Petrel 2 is listed as available dive computer on iOS (which requires BLE support)
// so always pick the "Petrel 2" as product when seeing a Petrel // so always pick the "Petrel 2" as product when seeing a Petrel