mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-10-01 04:24:50 +00:00
ESP-IDF Robot Controls
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#ifndef CONTROLS_H
|
#ifndef CONTROLS_H
|
||||||
#define CONTROLSC_H
|
#define CONTROLSC_H
|
||||||
|
|
||||||
|
// To prevent assigning forbidden rpm values to the motor (i.e. to avoid short-citcuit) accidentially,
|
||||||
|
// we define one struct tha tholds RPMs for four motors, as opposed to defining array of structs for single motor.
|
||||||
struct motors_rpm {
|
struct motors_rpm {
|
||||||
int motor1_rpm;
|
int motor1_rpm;
|
||||||
int motor2_rpm;
|
int motor2_rpm;
|
||||||
@@ -8,10 +10,4 @@ struct motors_rpm {
|
|||||||
int motor4_rpm;
|
int motor4_rpm;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct motor {
|
|
||||||
int pcm;
|
|
||||||
bool rotation;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
Reference in New Issue
Block a user