-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindingMachine.h
More file actions
45 lines (24 loc) · 940 Bytes
/
WindingMachine.h
File metadata and controls
45 lines (24 loc) · 940 Bytes
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
#pragma once
#include "WOhardwareLogic.h"
#include "Worder.h"
class WindingMachine {
public:
WindingMachine();
Worder GetCurrentState(void);
Worder GetTargetOrder(void);
void AddOneTurnToCurState(void);
void SubtracktTurnToCurState(void);
void ResetCurrentState(void);
void SetTargetOrder(unsigned int turnscount, unsigned int turnspeed, bool clockwise);
void SetCurrentState(unsigned int turnscount, unsigned int turnspeed, bool clockwise);
void Start(void);
void StopMachine(void);
void UpdateTargetSpeed(unsigned int newspeed );
void UpdateSettings(const int preScaler, const int dutyCycle, const int motorStepsPerTurn);
private:
void UpSpeedCorrections (void);
void UpdateSpeedOnRun(void);
Worder state_; // Current State
Worder target_; // Target Parameters
WinMachSettings settings_; // Winding Machine Counters settings
};