-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathoaeSteps.js
More file actions
157 lines (156 loc) · 7.55 KB
/
oaeSteps.js
File metadata and controls
157 lines (156 loc) · 7.55 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// OAE Configuration Steps
import { createTrackerSelectionStep, createHemisphereStep, createTrackingOnBootStep } from '../base/commonSteps.js';
export const getOAESteps = () => [
createTrackerSelectionStep(),
{
id: 'FWE',
title: 'Firmware',
label: 'You must use V1.13.x firmware on OAE:',
variable: 'fwversion',
define: '',
control: {
type: 'radioimg',
choices: [
{
key: 'L', value: 'Latest Version (V1.13.x)', image: '/images/none.png', defineValue: '', additionalLines: [
'// OAE requires the much higher stepper performance of the new stepper library.',
'#define NEW_STEPPER_LIB'
],
additionalVariables: [
{ 'autopa': 'Y' },
{ 'autopaversion': '2' },
{ 'stepperlib': 'N' },
{ 'board': 'OAEV1' }
]
},
]
},
},
createHemisphereStep(),
{
id: 'BD',
title: 'Board',
label: 'Which microcontroller board are you using:',
variable: 'board',
preamble: ['// We are using the {v} board'],
postamble: [{
literal: [
'#if defined(BOARD) && BOARD != {v}',
' #error Selected PIO environment does not match this configuration',
'#else',
' #define BOARD {v}',
'#endif',
'',
'////////////////////////////////',
'// RA Stepper configuration ',
'// See supported stepper values. Change according to the steppers you are using',
'// Using the NEMA 17, 0.9°/step stepper for RA',
'#define RA_STEPPER_TYPE STEPPER_TYPE_ENABLE',
'',
'// Using the TMC2209-UART driver for RA stepper motor',
'#define RA_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART',
'',
'// Define some RA stepper motor settings',
'#define RA_MOTOR_CURRENT_RATING 2000 // mA',
'#define RA_OPERATING_CURRENT_SETTING 50 // %',
'#define RA_SLEW_MICROSTEPPING 4',
'#define RA_TRACKING_MICROSTEPPING 256',
'',
'// TMC2209 Stealth Mode (spreadCycle) - When set to 0, tracking is more precise, but noisy (high-pitched sound). When set to 1, they are silent.',
'#define RA_UART_STEALTH_MODE 0',
'',
'// Is it going the wrong way?',
'#define RA_INVERT_DIR 0',
'',
'// Define some RA stepper motor settings',
'',
'#define RA_SLEWING_SPEED_DEGREE 4',
'#define RA_ACCEL_SecToFullSpeed 1.5 // Seconds to reach full slewing speed',
'',
'#define RA_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper',
'#define DEC_STEPPER_SPR (200 * 50 * 4.5f) // change "200" to "400" for 0.9° stepper, change "50" to different value depending on worm gear used',
'',
'// Using the 16 tooth gear (recommended) for RA belt',
'#define RA_PULLEY_TEETH 16',
'',
'#define RA_STEPPER_SPEED RA_SLEWING_SPEED_DEGREE * (RA_STEPPER_SPR * RA_SLEW_MICROSTEPPING * (RA_WHEEL_CIRCUMFERENCE / (RA_PULLEY_TEETH * GT2_BELT_PITCH)) / 360) //3525',
'#define RA_STEPPER_ACCELERATION (RA_STEPPER_SPEED / RA_ACCEL_SecToFullSpeed)',
'',
'',
'////////////////////////////////',
'// DEC Stepper configuration ',
'// See supported stepper values. Change according to the steppers you are using',
'// Using the NEMA 17, 0.9°/step stepper for DEC',
'#define DEC_STEPPER_TYPE STEPPER_TYPE_ENABLE',
'',
'// Using the TMC2209-UART driver for DEC stepper',
'#define DEC_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART',
'',
'// Define some DEC stepper motor settings',
'#define DEC_MOTOR_CURRENT_RATING 2000 // mA',
'#define DEC_OPERATING_CURRENT_SETTING 50 // %',
'#define DEC_SLEW_MICROSTEPPING 16',
'#define DEC_GUIDE_MICROSTEPPING 256',
'',
'// TMC2209 Stealth Mode (spreadCycle) - When set to 0, tracking is more precise, but noisy (high-pitched sound). When set to 1, they are silent.',
'#define DEC_UART_STEALTH_MODE 1',
'',
'// Is it going the wrong way?',
'#define DEC_INVERT_DIR 1',
'',
'#define DEC_SLEWING_SPEED_DEGREE RA_SLEWING_SPEED_DEGREE',
'#define DEC_ACCEL_SecToFullSpeed RA_ACCEL_SecToFullSpeed',
'',
'#define DEC_STEPPER_SPEED DEC_SLEWING_SPEED_DEGREE * (DEC_STEPPER_SPR * DEC_SLEW_MICROSTEPPING / 360 ) // * (DEC_WHEEL_CIRCUMFERENCE / (DEC_PULLEY_TEETH * GT2_BELT_PITCH)) / 360)',
'#define DEC_STEPPER_ACCELERATION (DEC_STEPPER_SPEED / DEC_ACCEL_SecToFullSpeed)',
'#define DEC_PULLEY_TEETH 1',
'',
'////////////////////////////////',
'// AZ Stepper Configuration',
'#define AZ_STEPPER_SPR 2048 // 28BYJ-48',
'#define AZ_MICROSTEPPING 1',
'#define AZ_STEPPER_SPEED 800',
'#define AZ_STEPPER_ACCELERATION 2000',
'',
'////////////////////////////////',
'// ALT Stepper Configuration',
'#define ALT_STEPPER_SPR 2048 // 28BYJ-48',
'#define ALT_MICROSTEPPING 1',
'#define ALT_STEPPER_SPEED 800',
'#define ALT_STEPPER_ACCELERATION 2000',
'',
'////////////////////////////////',
'// Display configuration ',
'// Define the type of display we are using. Currently: No display',
'#define DISPLAY_TYPE DISPLAY_TYPE_NONE',
'',
'////////////////////////////////',
'// GPS Addon configuration ',
'// Define whether we have the GPS addon or not. Currently: No GPS',
'#define USE_GPS 0',
'',
'// Using the NEMA 17, 0.9°/step stepper for AZ',
'#define AZ_STEPPER_TYPE STEPPER_TYPE_ENABLED',
'#define ALT_STEPPER_TYPE STEPPER_TYPE_ENABLED',
'',
'// Using the TMC2209-UART driver for AZ stepper motor',
'#define AZ_DRIVER_TYPE DRIVER_TYPE_A4988_GENERIC ',
'#define ALT_DRIVER_TYPE DRIVER_TYPE_A4988_GENERIC ',
'',
'////////////////////////////////',
'// Digital Level Addon configuration ',
'// Define whether we have the Digital Level or not. Currently: No Digital Level',
'#define USE_GYRO_LEVEL 0',
'',
'#define WIFI_ENABLED 0 '
]
}],
control: {
type: 'radioimg',
choices: [
{ key: 'OAEV1', value: 'OAE_V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' },
],
},
},
createTrackingOnBootStep(),
];