BTDataProcess.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // BTDataProcessVC.h
  3. // Unity-iPhone
  4. //
  5. // Created by duowan123 on 2021/2/3.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import <CoreBluetooth/CoreBluetooth.h>
  9. //蓝牙框架封装
  10. #import "LEONBLManager.h"
  11. #define LEManager [LEONBLManager sharedInstance]
  12. @interface BTDataProcess : UIViewController
  13. //单例->初始化蓝牙
  14. +(instancetype)sharedInstance;
  15. //初始化中心管理
  16. -(void)initCBCentralManager;
  17. //app跳转直接连 或 tableview 选中
  18. -(void)connectPeripheral:(CBPeripheral*)peripheral;
  19. //外部断开
  20. -(void)disConnedctBle;
  21. //app 跳转传过来的mac 实际是蓝牙设备的identity
  22. @property(copy,nonatomic)NSString * macAddress;
  23. //弹窗 unity主动选择链接 主0 副1 设备
  24. @property(assign,nonatomic)DEVICE_TYPE deviceType;
  25. //游戏种类 1是跳舞 3是跑酷 2是赛达尔传说 4是demo->dance
  26. @property(assign,nonatomic)int game_id;
  27. @property(copy,nonatomic)void (^deviceArrBLock)(NSMutableArray*arr);//蓝牙设备数据源回调给popSeaechView
  28. //主设备跳起 下蹲 步数 的总数
  29. @property(assign,nonatomic)int jump_count;
  30. @property(assign,nonatomic)int crouch_count;
  31. @property(assign,nonatomic)int step_count;
  32. //步数回调缓存
  33. @property(copy,nonatomic)void (^allMotionCountBLock)(int jump_count,int crouch_count,int step_count);//蓝牙设备数据源
  34. @end