mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-07 19:01:06 +00:00
first version with inquiry view working
This commit is contained in:
parent
141679a411
commit
edeeb1de6a
4
TODO.txt
4
TODO.txt
@ -5,9 +5,9 @@ NEXT:
|
||||
- on device select:
|
||||
- if name != WiiMote
|
||||
- show alert: need wiimote
|
||||
- stop inquiry
|
||||
- set flag to connecting for wiimote
|
||||
- set flag to connecting for WiiMote
|
||||
- on connect, switch view
|
||||
- on back button, disconnect device
|
||||
- improve user experience of BTstack Inquiry View
|
||||
- shorter inquiry interval
|
||||
- repeat inquiry while BT on
|
||||
|
@ -12,6 +12,8 @@
|
||||
#import <OpenGLES/ES1/gl.h>
|
||||
#import <OpenGLES/ES1/glext.h>
|
||||
|
||||
#define USE_BLUETOOTH
|
||||
|
||||
/*
|
||||
This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
|
||||
The view content is basically an EAGL surface you render your OpenGL scene into.
|
||||
|
@ -18,7 +18,7 @@
|
||||
UILabel *status;
|
||||
}
|
||||
|
||||
- (void)startDemo:(id) arg;
|
||||
- (void)startDemo;
|
||||
|
||||
|
||||
@property (nonatomic, retain) UIWindow *window;
|
||||
|
@ -14,8 +14,6 @@
|
||||
#import <btstack/run_loop.h>
|
||||
#import <btstack/hci_cmds.h>
|
||||
|
||||
#define USE_BLUETOOTH
|
||||
|
||||
BTDevice *device;
|
||||
|
||||
WiiMoteOpenGLDemoAppDelegate * theMainApp;
|
||||
@ -96,14 +94,8 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
uint8_t setLEDs[] = { 0x52, 0x11, 0x10 };
|
||||
bt_send_l2cap( source_cid, setLEDs, sizeof(setLEDs));
|
||||
|
||||
// start GL demo
|
||||
// [device setConnectionState:kBluetoothConnectionConnected];
|
||||
// [[[theMainApp inqViewControl] tableView] reloadData];
|
||||
|
||||
// do perform on main thread stuff
|
||||
// [[theMainApp navControl] pushViewController:[theMainApp glViewControl] animated:YES];
|
||||
[theMainApp performSelectorOnMainThread:@selector(startDemo:)
|
||||
withObject:nil waitUntilDone:false];
|
||||
// start demo
|
||||
[theMainApp startDemo];
|
||||
}
|
||||
break;
|
||||
|
||||
@ -115,8 +107,14 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
break;
|
||||
}
|
||||
}
|
||||
- (void)startDemo:(id) arg {
|
||||
- (void)startDemo {
|
||||
NSLog(@"startDemo");
|
||||
|
||||
// stop connection icon
|
||||
[device setConnectionState:kBluetoothConnectionConnected];
|
||||
|
||||
// push glViewControl on stack
|
||||
[[[theMainApp inqViewControl] tableView] reloadData];
|
||||
[navControl pushViewController:glViewControl animated:YES];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user