updated movement Tasks to handle multiple calling properbly and prepare calibration feature

This commit is contained in:
hhaupt
2024-06-14 01:22:46 +02:00
parent 4f308412e4
commit 2701446915
4 changed files with 100 additions and 23 deletions

View File

@@ -52,12 +52,18 @@ protected:
static void moveTask(void * args);
static void leftMotorTask(void * args);
static void rightMotorTask(void * args);
static inline TaskHandle_t xMoveTaskHandle = NULL;
static inline TaskHandle_t xClockwiseTaskHandle = NULL;
static inline TaskHandle_t xAntiClockwiseTaskHandle = NULL;
static inline TickType_t xLastWakeTime;
public:
//Shared Timer to sync movement
static inline Motor left = Motor(MOTOR_LEFT_PIN,TIMER,CHANNEL_LEFT);
static inline Motor right = Motor(MOTOR_RIGHT_PIN,TIMER,CHANNEL_RIGHT);
friend class Dezibot;
//MotionDetection instance, for motion Correction and user (access with dezibot.motion.detection)
static inline MotionDetection detection;
/**
* constructor gets a pointer to the motiondetection class, which enables correction of the motion