Skip to content

Commit 6afb70d

Browse files
authored
Update REMgQ29tcG9uZW50.h
Signed-off-by: Adrian <[email protected]>
1 parent 0b171e3 commit 6afb70d

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

src/REMgQ29tcG9uZW50.h

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,10 @@ struct setup {
33
int input2;
44
int dc;
55
};
6-
7-
my_point2.x = 4;
86

9-
int attachedInput1 = 0;
10-
int attachedInput2 = 0;
11-
int attachedEngine = 0;
12-
13-
void attachEngine(int pin) {
14-
attachedEngine = pin;
15-
}
16-
17-
void attach(int input1, int input2, int engine) {
18-
attachInput1(input1);
19-
attachInput2(input2);
20-
attachEngine(engine);
21-
}
22-
23-
void Input1(int mode, const speed) {
24-
digitalWrite(attachedInput1, mode);
25-
if(speed != "") {
26-
analogWrite(attachedEngine, speed);
27-
}
28-
}
29-
30-
void Input2(int mode, int speed) {
31-
digitalWrite(attachedInput2, mode);
7+
void moveDC(int mode, const speed) {
8+
digitalWrite(setup.input1, mode);
329
if(speed != "") {
33-
analogWrite(attachedEngine, speed);
10+
analogWrite(setup.dc, speed);
3411
}
3512
}

0 commit comments

Comments
 (0)