forked from idsc-frazzoli/Seesaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtControl.h
42 lines (31 loc) · 1.04 KB
/
tControl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* tControl.h
*
* This task runs the controller. It takes measurements from the
* gyro task, calculates the needed motor value and forwards them
* to the motor task.
*
* Created on: 08.09.2017
* Author: mac
*/
#ifndef TCONTROL_H_
#define TCONTROL_H_
/* Includes ------------------------------------------------------------------*/
#include "cmsis_os.h"
#include "../userApp/dVariables.h"
/* Variables -----------------------------------------------------------------*/
extern osMessageQId MotorcommandQueueHandle;
extern osMessageQId GyrodataQueueHandle;
#pragma pack(push, 1) // exact fit - no padding
struct signalPackage{
double r;
double y;
double u;
};
#pragma pack(pop) //back to whatever the previous packing mode was
extern struct signalPackage seeSig;
extern char inSignalWrite;
/* Function prototypes -------------------------------------------------------*/
void vtControlStartTask(void const * argument);
void vReadDataFromQueue(osMessageQId *GyrodataQueueHandle, xIMUDATA_t *xIMUDataBuffer );
#endif /* TCONTROL_H_ */