mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +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.
|
// Created by Matthias Ringwald on 3/30/09.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "BTDevice.h"
|
#import "btstack/BTDevice.h"
|
||||||
|
|
||||||
@implementation BTDevice
|
@implementation BTDevice
|
||||||
|
|
||||||
|
@ -205,7 +205,14 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(BOOL) isActivating {
|
-(BOOL) isActivating {
|
||||||
return state == kW4Activated;
|
switch (state){
|
||||||
|
case kW4SysBTState:
|
||||||
|
case kW4SysBTDisabled:
|
||||||
|
case kW4Activated:
|
||||||
|
return YES;
|
||||||
|
default:
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
-(BOOL) isDiscoveryActive {
|
-(BOOL) isDiscoveryActive {
|
||||||
return state == kActivated && (discoveryState != kInactive);
|
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;
|
if (state < kActivated) return BTSTACK_NOT_ACTIVATED;
|
||||||
switch (discoveryState){
|
switch (discoveryState){
|
||||||
case kInactive:
|
case kInactive:
|
||||||
state = kDeactivated;
|
|
||||||
[self sendDiscoveryStoppedEvent];
|
[self sendDiscoveryStoppedEvent];
|
||||||
break;
|
break;
|
||||||
case kW4InquiryMode:
|
case kW4InquiryMode:
|
||||||
|
4
TODO.txt
4
TODO.txt
@ -3,6 +3,10 @@
|
|||||||
2009-11-08: Release 0.1
|
2009-11-08: Release 0.1
|
||||||
|
|
||||||
NEXT:
|
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
|
- BUG: bt_close crashes when used in CocoaTouch app
|
||||||
- add extern "C" to bstack methods
|
- add extern "C" to bstack methods
|
||||||
- see: http://stackoverflow.com/questions/376966/using-c-c-static-libraries-from-iphone-objectivec-apps
|
- see: http://stackoverflow.com/questions/376966/using-c-c-static-libraries-from-iphone-objectivec-apps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user