blob: f568f981670000c175ea81c7fc0ee1cd7f588426 (
plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#ifndef MODULES_THREAD_THREAD_H_
#define MODULES_THREAD_THREAD_H_
#include "PMR/common/MessageContainer.pb-c.h"
#include "PMR/Hardware/HardwareMotor.pb-c.h"
#include "PMR/Hardware/HardwareMotorType.pb-c.h"
#include "PMR/Hardware/HardwareDancer.pb-c.h"
#include "PMR/Hardware/HardwareDancerType.pb-c.h"
#include "PMR/Hardware/HardwareWinder.pb-c.h"
#include "PMR/Printing/JobSpool.pb-c.h"
#include "PMR/Printing/JobSpoolType.pb-c.h"
typedef struct
{
HardwareMotorType id;
uint32_t minfreq;
uint32_t maxfreq;
uint32_t minmicrostep;
uint32_t maxmicrostep;
double linearratio;
uint32_t medianposition;
double correctiongain;
double ratio2dryerspeed;
double kp;
double ki;
double kd;
double changeslope;
double hightimeoutusec;
}MotorConfigStruc;
typedef struct
{
uint32_t startoffsetpulses;
uint32_t spoolbackingrate;
uint32_t segmentoffsetpulses;
uint32_t milimetersperrotation;
}InternalWinderConfigStruc;
typedef struct
{
bool fixorgradual;
double k;
double x;
int32_t pulsepermmspring;
int id; //HardwareDancerType
}DancerConfigStruc;
typedef enum threadMotorsEnum
{
FEEDER_MOTOR,
DRYER_MOTOR,
POOLER_MOTOR,
WINDER_MOTOR,
SCREW_MOTOR,
MAX_THREAD_MOTORS_NUM
}threadMotorsEnum;
extern uint32_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM];
extern MotorConfigStruc MotorsCfg[MAX_THREAD_MOTORS_NUM];
extern InternalWinderConfigStruc InternalWinderCfg;
uint32_t InternalWinderConfigMessage(HardwareWinder* request);
uint32_t MotorsConfigMessage(HardwareMotor * request);
uint32_t InternalWindingConfigMessage(JobSpool* request);
uint32_t DancerConfigMessage(HardwareDancer * request);
#endif //MODULES_THREAD_THREAD_H_
|