12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // BTDataProcessVC.h
- // Unity-iPhone
- //
- // Created by duowan123 on 2021/2/3.
- //
- #import <UIKit/UIKit.h>
- #import <CoreBluetooth/CoreBluetooth.h>
- //蓝牙框架封装
- #import "LEONBLManager.h"
- #define LEManager [LEONBLManager sharedInstance]
- //设备类型
- typedef NS_ENUM(int, GAME_TYPE){
- GAME_TYPE_DEMO =0, //
- GAME_TYPE_RUN, //
- GAME_TYPE_DANCE, //
- GAME_TYPE_SDAER, //
- };
- @interface BTDataProcess : UIViewController
- //单例->初始化蓝牙
- +(instancetype)sharedInstance;
- //初始化中心管理
- -(void)initCBCentralManager;
- //app跳转直接连 或 tableview 选中
- -(void)connectPeripheral:(CBPeripheral*)peripheral;
- //外部断开
- -(void)disConnedctBle;
-
- //app 跳转传过来的mac 实际是蓝牙设备的identity
- @property(copy,nonatomic)NSString * macAddress;
- //弹窗 unity主动选择链接 主0 副1 设备
- @property(assign,nonatomic)DEVICE_TYPE deviceType;
- //游戏种类 1是跳舞 3是跑酷 2是赛达尔传说 4是demo->dance
- @property(assign,nonatomic)GAME_TYPE game_id;
- @property(copy,nonatomic)void (^deviceArrBLock)(NSMutableArray*arr);//蓝牙设备数据源回调给popSeaechView
- //主设备跳起 下蹲 步数 的总数
- @property(assign,nonatomic)int jump_count;
- @property(assign,nonatomic)int crouch_count;
- @property(assign,nonatomic)int step_count;
- //步数回调缓存
- @property(copy,nonatomic)void (^allMotionCountBLock)(int jump_count,int crouch_count,int step_count);//蓝牙设备数据源
- @end
|