BTDataProcess.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. //设备类型
  13. typedef NS_ENUM(int, GAME_TYPE){
  14. GAME_TYPE_DEMO =0, //
  15. GAME_TYPE_RUN, //
  16. GAME_TYPE_DANCE, //
  17. GAME_TYPE_SDAER, //
  18. };
  19. @interface BTDataProcess : UIViewController
  20. //单例->初始化蓝牙
  21. +(instancetype)sharedInstance;
  22. //初始化中心管理
  23. -(void)initCBCentralManager;
  24. //app跳转直接连 或 tableview 选中
  25. -(void)connectPeripheral:(CBPeripheral*)peripheral;
  26. //外部断开
  27. -(void)disConnedctBle;
  28. //app 跳转传过来的mac 实际是蓝牙设备的identity
  29. @property(copy,nonatomic)NSString * macAddress;
  30. //弹窗 unity主动选择链接 主0 副1 设备
  31. @property(assign,nonatomic)DEVICE_TYPE deviceType;
  32. //游戏种类 1是跳舞 3是跑酷 2是赛达尔传说 4是demo->dance
  33. @property(assign,nonatomic)GAME_TYPE game_id;
  34. @property(copy,nonatomic)void (^deviceArrBLock)(NSMutableArray*arr);//蓝牙设备数据源回调给popSeaechView
  35. //主设备跳起 下蹲 步数 的总数
  36. @property(assign,nonatomic)int jump_count;
  37. @property(assign,nonatomic)int crouch_count;
  38. @property(assign,nonatomic)int step_count;
  39. //步数回调缓存
  40. @property(copy,nonatomic)void (^allMotionCountBLock)(int jump_count,int crouch_count,int step_count);//蓝牙设备数据源
  41. @end