5#ifndef PAMIS_I2CDCDRIVER_H
6#define PAMIS_I2CDCDRIVER_H
20#define PCA9685_HIGH 4096
38 I2CDCDriver(
int m1_fwd_port,
int m1_bck_port,
int m1_pwm,
int m2_fwd_port,
int m2_bck_port,
int m2_pwm,
int stdby_port);
96 i2c_dev_t* m_dev = {};
97 float m_currentVelocity;
98 bool m_lastForward[2];
Interface abstraite des drivers moteurs.
Représente un driver moteur abstrait.
Definition motors/include/AbstractDriver.h:27
Definition motors/include/AbstractMotors.h:14
Definition motors/include/I2CDCDriver.h:31
int attach(AbstractMotor *motor) override
Attache un moteur au canal disponible (ID 0).
void setSleep(bool active)
Contrôle le mode basse consommation.
int attach(AbstractMotor *motor, uint8_t id) override
Attache un moteur à un ID spécifique.
void setVelocity(float velocity, uint8_t id) override
Définit la vitesse de sortie pour le moteur spécifié.
float getVelocity(uint8_t id) const override
Récupère la dernière vitesse appliquée.
bool isFaulty() const
Vérifie l'état de santé du driver.
I2CDCDriver(int m1_fwd_port, int m1_bck_port, int m1_pwm, int m2_fwd_port, int m2_bck_port, int m2_pwm, int stdby_port)
Constructeur du driver DRV8876.
void init(i2c_dev_t *dev)
Initialise les broches matérielles. Configure les entrées/sorties et réveille le driver si sleepPin e...