Actuator.h 820 B

1234567891011121314151617181920212223242526272829303132
  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 <time.h>
  18. typedef struct Actuator
  19. {
  20. bool active;
  21. bool continuous;
  22. clock_t endTime;
  23. float intensity;
  24. float minIntensity; // Cut off values under threshold (default: 0)
  25. float maxIntensity; // Cut off values over threshold (default: 1)
  26. uint16_t frequency; // 250Hz, for Pacinian corpuscles use 200-300Hz
  27. } Actuator;
  28. void Actuator_setModeOnce(Actuator* actuator, float intensity, uint64_t duration);
  29. void Actuator_setModeContinuous(Actuator* actuator, float intensity);
  30. void Actuator_setModeStop(Actuator* actuator);