洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
811 B

9 months ago
  1. //
  2. // ToygerSensorHandler.h
  3. // ToygerService
  4. //
  5. // Created by 晗羽 on 2018/5/17.
  6. // Copyright © 2018 DTF. All rights reserved.
  7. //
  8. #ifdef USE_SENSOR
  9. #import <Foundation/Foundation.h>
  10. #import <ToygerService/ToygerSensorData.h>
  11. struct ToygerSensorResult {
  12. bool highRisk = false;
  13. bool isStatic = false;
  14. float maxRotationAngle = 0.f;
  15. };
  16. @interface ToygerSensorConfig: NSObject
  17. @property (nonatomic)float static_threshold;
  18. @property (nonatomic)float rotation_threshold;
  19. @property (nonatomic)float offset;
  20. @end
  21. @interface ToygerSensorHandler : NSObject
  22. -(instancetype)initWithConfig:(ToygerSensorConfig *) config;
  23. -(void)processSensorData:(ToygerSensorData *) dataSlice;
  24. -(NSData *)getSampleData;
  25. -(ToygerSensorResult)getSensorResult;
  26. @property (nonatomic)float offset;
  27. @end
  28. #endif