Actuator.h 838 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Actuator.h
  3. *
  4. * Copyright (C)
  5. * Honda Research Institute Europe GmbH
  6. * Carl-Legien-Str. 30
  7. * 63073 Offenbach/Main
  8. * Germany
  9. *
  10. * UNPUBLISHED PROPRIETARY MATERIAL.
  11. * ALL RIGHTS RESERVED.
  12. *
  13. */
  14. #pragma once
  15. #include <stdbool.h>
  16. #include <stdint.h>
  17. #include <ctime>
  18. //#include <time.h>
  19. typedef struct Actuator
  20. {
  21. bool active;
  22. bool continuous;
  23. clock_t endTime;
  24. float intensity;
  25. float minIntensity; // Cut off values under threshold (default: 0)
  26. float maxIntensity; // Cut off values over threshold (default: 1)
  27. uint16_t frequency; // 250Hz, for Pacinian corpuscles use 200-300Hz
  28. } Actuator;
  29. void Actuator_setModeOnce(Actuator* actuator, float intensity, uint64_t duration);
  30. void Actuator_setModeContinuous(Actuator* actuator, float intensity);
  31. void Actuator_setModeStop(Actuator* actuator);