mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-24 13:43:38 +00:00
fix state reporting of BTstackManager
This commit is contained in:
parent
c0db20ab37
commit
6eb71891e9
@ -35,7 +35,7 @@
|
||||
// Created by Matthias Ringwald on 3/30/09.
|
||||
//
|
||||
|
||||
#import "BTDevice.h"
|
||||
#import "btstack/BTDevice.h"
|
||||
|
||||
@implementation BTDevice
|
||||
|
||||
|
@ -205,7 +205,14 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
}
|
||||
|
||||
-(BOOL) isActivating {
|
||||
return state == kW4Activated;
|
||||
switch (state){
|
||||
case kW4SysBTState:
|
||||
case kW4SysBTDisabled:
|
||||
case kW4Activated:
|
||||
return YES;
|
||||
default:
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
-(BOOL) isDiscoveryActive {
|
||||
return state == kActivated && (discoveryState != kInactive);
|
||||
@ -223,7 +230,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
if (state < kActivated) return BTSTACK_NOT_ACTIVATED;
|
||||
switch (discoveryState){
|
||||
case kInactive:
|
||||
state = kDeactivated;
|
||||
[self sendDiscoveryStoppedEvent];
|
||||
break;
|
||||
case kW4InquiryMode:
|
||||
|
4
TODO.txt
4
TODO.txt
@ -3,6 +3,10 @@
|
||||
2009-11-08: Release 0.1
|
||||
|
||||
NEXT:
|
||||
- clean up control flow
|
||||
- l2cap directly sends data over socket: good/bad?
|
||||
- split daemon into stack parts
|
||||
- should there be STACK API/interface?
|
||||
- BUG: bt_close crashes when used in CocoaTouch app
|
||||
- add extern "C" to bstack methods
|
||||
- see: http://stackoverflow.com/questions/376966/using-c-c-static-libraries-from-iphone-objectivec-apps
|
||||
|
Loading…
x
Reference in New Issue
Block a user