File tree 4 files changed +13
-27
lines changed
4 files changed +13
-27
lines changed Original file line number Diff line number Diff line change @@ -191,5 +191,16 @@ void HotStepper::triggerTop(){
191
191
}
192
192
}
193
193
194
+ #ifdef HOTSTEPPER_TIMER1
195
+ ISR (TIMER1_COMPA_vect)
196
+ {
197
+ HotStepper::triggerTop ();
198
+ }
199
+ #endif
194
200
195
-
201
+ #ifdef HOTSTEPPER_TIMER2
202
+ ISR (TIMER2_COMPA_vect)
203
+ {
204
+ HotStepper::triggerTop ();
205
+ }
206
+ #endif
Original file line number Diff line number Diff line change 11
11
#define TIMER1INT 1
12
12
#define TIMER2INT 2
13
13
14
- #ifndef HOTSTEPPER_TIMER1
15
- #define HOTSTEPPER_TIMER2
16
- #endif
17
-
14
+ #define HOTSTEPPER_TIMER1
18
15
19
16
class HotStepper {
20
17
public:
@@ -47,21 +44,4 @@ class HotStepper {
47
44
byte unpad (byte, byte);
48
45
};
49
46
50
- #ifndef FROM_LIB
51
- #ifdef HOTSTEPPER_TIMER1
52
- ISR (TIMER1_COMPA_vect)
53
- {
54
- HotStepper::triggerTop ();
55
- }
56
- #endif
57
-
58
- #ifdef HOTSTEPPER_TIMER2
59
- ISR (TIMER2_COMPA_vect)
60
- {
61
- HotStepper::triggerTop ();
62
- }
63
47
#endif
64
- #endif
65
-
66
- #endif
67
-
Original file line number Diff line number Diff line change 1
1
#ifndef Mirobot_h
2
2
#define Mirobot_h
3
3
4
- #define FROM_LIB
5
4
#include " Arduino.h"
6
5
#include " HotStepper.h"
7
6
#include " CmdProcessor.h"
8
- #include " HotStepper.h"
9
7
#include < EEPROM.h>
10
8
11
9
#define STEPS_PER_TURN 2048.0
Original file line number Diff line number Diff line change 1
- #define HOTSTEPPER_TIMER1
2
- #include < stdlib.h>
3
- #include < HotStepper.h>
4
1
#include < Mirobot.h>
5
2
#include < EEPROM.h>
6
3
You can’t perform that action at this time.
0 commit comments