mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-25 00:02:27 +00:00
add note about SYNC button
This commit is contained in:
parent
b72943e7dd
commit
e75e8007bb
@ -44,6 +44,10 @@
|
|||||||
#import <btstack/run_loop.h>
|
#import <btstack/run_loop.h>
|
||||||
#import <btstack/hci_cmds.h>
|
#import <btstack/hci_cmds.h>
|
||||||
|
|
||||||
|
@interface UIDevice (privateAPI)
|
||||||
|
-(BOOL) isWildcat;
|
||||||
|
@end
|
||||||
|
|
||||||
// quaternion rotation library
|
// quaternion rotation library
|
||||||
float norm(float *vector, int dim);
|
float norm(float *vector, int dim);
|
||||||
void normalizeVector(float *vector, int dim);
|
void normalizeVector(float *vector, int dim);
|
||||||
@ -232,6 +236,22 @@ static float addToHistory(int history[histSize], int value){
|
|||||||
discoveryView = [[BTDiscoveryViewController alloc] init];
|
discoveryView = [[BTDiscoveryViewController alloc] init];
|
||||||
[discoveryView setDelegate:self];
|
[discoveryView setDelegate:self];
|
||||||
|
|
||||||
|
// footer text
|
||||||
|
CGRect newFrame = CGRectMake(0.0, 0.0, discoveryView.tableView.bounds.size.width, 100);
|
||||||
|
UIView *footerView = [[UIView alloc] initWithFrame:newFrame];
|
||||||
|
|
||||||
|
UIDevice * uiDevice = [UIDevice currentDevice];
|
||||||
|
float margin = ([uiDevice respondsToSelector:@selector(isWildcat)] && [uiDevice isWildcat]) ? 50 : 20;
|
||||||
|
|
||||||
|
UITextView *footer = [[UITextView alloc] initWithFrame:CGRectMake(margin,10,discoveryView.tableView.bounds.size.width - 2 * margin ,85)];
|
||||||
|
footer.text = @"Please make your WiiMote discoverable by pressing the little RED SYNC button.";
|
||||||
|
footer.font = [UIFont fontWithName:@"Arial" size:18];
|
||||||
|
footer.backgroundColor = [UIColor groupTableViewBackgroundColor];
|
||||||
|
footer.editable = false;
|
||||||
|
[footerView addSubview:footer];
|
||||||
|
[[discoveryView tableView] setTableFooterView:footerView];
|
||||||
|
|
||||||
|
|
||||||
// TODO fix
|
// TODO fix
|
||||||
// [discoveryView setAllowSelection:NO];
|
// [discoveryView setAllowSelection:NO];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user