mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 08:37:22 +00:00
only compare prefix instead of doing a full compare
This commit is contained in:
parent
b11afe85d0
commit
406449b9b9
@ -230,7 +230,7 @@ static void bt_data_cb(uint8_t x, uint8_t y, uint8_t z){
|
||||
|
||||
-(void) btstackManager:(BTstackManager*)manager deviceInfo:(BTDevice*)newDevice {
|
||||
NSLog(@"Device Info: addr %@ name %@ COD 0x%06x", [newDevice addressString], [newDevice name], [newDevice classOfDevice] );
|
||||
if ([newDevice name] && [[newDevice name] caseInsensitiveCompare:@"Nintendo RVL-CNT-01"] == NSOrderedSame){
|
||||
if ([newDevice name] && [[newDevice name] hasPrefix:@"Nintendo RVL-CNT-01"]){
|
||||
NSLog(@"WiiMote found with address %@", [newDevice addressString]);
|
||||
device = newDevice;
|
||||
[[BTstackManager sharedInstance] stopDiscovery];
|
||||
|
Loading…
x
Reference in New Issue
Block a user