JMotor
Loading...
Searching...
No Matches
JDrivetrain.h
Go to the documentation of this file.
1#ifndef JDRIVETRAIN_H
2#define JDRIVETRAIN_H
3#include "JDrivetrainBasic.h"
4#include "JTwoDTransform.h"
5#include <Arduino.h>
9// TODO: comments
11public:
12 virtual JTwoDTransform getVel(bool _run = false);
13 virtual JTwoDTransform getDist(bool _run = false);
14 virtual void setDistSetpoint(JTwoDTransform _dist, bool _run = false);
15 virtual void setDistDelta(JTwoDTransform _dist, bool _run = false);
16 virtual void resetDist();
17 virtual void setMotorVel(float vel, unsigned char i, bool _run = false);
18 virtual void setMotorDistSetpoint(float distSetpoint, unsigned char i, bool _run = false);
19 virtual void setMotorDistDelta(float distDelta, unsigned char i, bool _run = false);
20 virtual float getMotorVel(unsigned char i);
21 virtual unsigned char getNumberMotors();
22};
24#include "JDrivetrainMecanum.h"
25#include "JDrivetrainSwerve.h"
26#include "JDrivetrainTwoSide.h"
27#endif // JDRIVETRAIN_H
interface for a drivetrain with only simple velocity control
Definition JDrivetrainBasic.h:8
defines interface for controlling any ground-based drivetrain
Definition JDrivetrain.h:10
virtual void setMotorDistDelta(float distDelta, unsigned char i, bool _run=false)
virtual JTwoDTransform getVel(bool _run=false)
virtual JTwoDTransform getDist(bool _run=false)
virtual unsigned char getNumberMotors()
virtual void setMotorVel(float vel, unsigned char i, bool _run=false)
virtual void setDistDelta(JTwoDTransform _dist, bool _run=false)
virtual float getMotorVel(unsigned char i)
virtual void resetDist()
virtual void setMotorDistSetpoint(float distSetpoint, unsigned char i, bool _run=false)
virtual void setDistSetpoint(JTwoDTransform _dist, bool _run=false)
struct for storing a 2 dimensional transformation. Used for telling a drivetrain how to move.
Definition JTwoDTransform.h:9