123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #pragma once
- #include <stdbool.h>
- #include "ArduinoHub.h"
- #include "EAIHub.h"
- typedef enum
- {
- BODYACTUATOR_TYPE_NONE,
- BODYACTUATOR_TYPE_EAI,
- BODYACTUATOR_TYPE_PIEZO,
- BODYACTUATOR_TYPE_ERM,
- BODYACTUATOR_TYPE_EMS
- } BodyActuator_Type;
- extern char* BodyActuator_Type_Names[5];
- typedef struct BodyActuator
- {
- bool valid;
- uint8_t actuatorCount;
- BodyActuator_Type type;
- ArduinoHub* arduinoHub;
- EAIHub* eaiHub;
- } BodyActuator;
- BodyActuator* BodyActuator_new();
- void BodyActuator_init(BodyActuator* self, BodyActuator_Type type, char* port, uint8_t actuatorCount);
- void BodyActuator_clear(BodyActuator* self);
- void BodyActuator_delete(BodyActuator* self);
- void BodyActuator_actuate(BodyActuator* self, uint8_t tactor, double intensity, uint64_t duration);
- void BodyActuator_startActuation(BodyActuator* self, uint8_t tactor, double intensity);
- void BodyActuator_stopActuation(BodyActuator* self, uint8_t tactor);
- void BodyActuator_setFrequency(BodyActuator* self, uint8_t tactor, uint16_t frequency);
- void BodyActuator_setIntensityRange(BodyActuator* self, uint8_t tactor, double minIntensity, double maxIntensity);
|