This commit is contained in:
cally22
2023-07-07 21:57:41 +02:00
commit dc5f14256e
12 changed files with 523 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
// DRONE.h
#ifndef DRONE_h
#define DRONE_h
#include <Arduino.h>
#include "MOTOR.h"
#include "RadioController.h"
#include "GYRO.h"
#include "enums.h" // Include the enums header file
#include "structs.h" // Include the structs header file
class DRONE {
private:
MOTOR back_right;
MOTOR back_left;
MOTOR front_right;
MOTOR front_left;
void updateMotors(float* mpuValues);
public:
RadioController radio;
GYRO gyro;
DRONE();
void setPinESC(int pin, MotorPosition mp);
void setSpeed(int speed, MotorPosition mp);
void accelerate();
bool initReceiver(int cepin, int cspin);
void update();
};
#endif