Skip to content

Commit c5ca724

Browse files
V3.10 Updates (#33)
* V3.10 Updates - Added AZ configuration for OAM - Added description to completed steps. - Typo fixed
1 parent e8ecf00 commit c5ca724

File tree

4 files changed

+139
-13
lines changed

4 files changed

+139
-13
lines changed

src/modules/Home.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Home = (props) => {
1313
<div className="intro-link-child">
1414
<h3 className="intro-header">OAT/OAM/OAE Firmware Configuration Generator</h3>
1515
<a className="intro-link" href="steps">START</a>
16-
<p className="version">V3.00</p>
16+
<p className="version">V3.10</p>
1717
</div>
1818
</div>
1919

src/modules/WizardStep.jsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ const WizardStep = (props) => {
360360
stepProps.forEach((step, index) => {
361361
let title = step.title;
362362
let description;
363+
364+
// For completed steps (index < stepIndex), show the chosen option
363365
if (index < stepIndex) {
364366
let foundConfig = configuration.find(config => config.variable === stepProps[index].variable);
365367
if (foundConfig && !Array.isArray(foundConfig.value)) {
@@ -371,14 +373,22 @@ const WizardStep = (props) => {
371373
description = foundControl.value;
372374
}
373375
}
376+
} else {
377+
// If no configuration found for this step, check if it was actually skipped due to conditions
378+
// rather than being completed
379+
if (stepProps[index].condition) {
380+
const expr = parseExpression(stepProps[index].condition);
381+
const exprResult = evaluateExpression(expr);
382+
if (exprResult.status === 'skip' || !exprResult.bool) {
383+
description = "N/A, skipped.";
384+
}
385+
} else {
386+
description = "N/A, skipped.";
387+
}
374388
}
375389
}
376390

377391
let skipState = shouldSkipStep(index);
378-
if ((skipState.skip) && (index < stepIndex)) {
379-
description = "N/A, skipped.";
380-
}
381-
382392
if ((!skipState.skip) || (index <= stepIndex)) {
383393
steps.push(<Step size="small" title={title} description={description} />)
384394
}

src/modules/configurations/base/commonSteps.js

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,24 +155,49 @@ export const createDECStepperStep = () => ({
155155
type: 'radioimg',
156156
choices: [
157157
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 2048.0f'], condition: "($stepperlib != N)" },
158-
{ key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' },
159-
{ key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 200.0f'] },
160-
{ key: 'N49', value: 'NEMA 14, 0.9°/step', image: '/images/nema14.png', defineValue: 'STEPPER_TYPE_ENABLED' },
161-
{ key: 'N48', value: 'NEMA 14, 1.8°/step', image: '/images/nema14.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 200.0f'] },
158+
{
159+
key: 'N9',
160+
value: 'NEMA 17, 0.9°/step',
161+
image: '/images/nema17.png',
162+
defineValue: 'STEPPER_TYPE_ENABLED',
163+
condition: "($tracker == OAT)",
164+
},
165+
{
166+
key: 'N8',
167+
value: 'NEMA 17, 1.8°/step',
168+
image: '/images/nema17.png',
169+
defineValue: 'STEPPER_TYPE_ENABLED',
170+
condition: "($tracker == OAT)",
171+
additionalLines: ['#define DEC_STEPPER_SPR 200.0f']
172+
},
173+
{
174+
key: 'N49',
175+
value: 'NEMA 14, 0.9°/step',
176+
image: '/images/nema14.png',
177+
defineValue: 'STEPPER_TYPE_ENABLED',
178+
condition: "($tracker == OAT)",
179+
},
180+
{
181+
key: 'N48',
182+
value: 'NEMA 14, 1.8°/step',
183+
image: '/images/nema14.png',
184+
defineValue: 'STEPPER_TYPE_ENABLED',
185+
condition: "($tracker == OAT)",
186+
additionalLines: ['#define DEC_STEPPER_SPR 200.0f'] },
162187
{
163188
key: 'N9O',
164189
value: 'NEMA 17, 0.9°/step',
165190
image: '/images/nema17.png',
166191
defineValue: 'STEPPER_TYPE_ENABLED',
167-
168-
additionalLines: ['#define DEC_STEPPER_SPR (400 * 9)']
192+
condition: "($tracker == OAM)",
193+
additionalLines: ['#define DEC_STEPPER_SPR (400 * 9)'],
169194
},
170195
{
171196
key: 'N8O',
172197
value: 'NEMA 17, 1.8°/step',
173198
image: '/images/nema17.png',
174199
defineValue: 'STEPPER_TYPE_ENABLED',
175-
200+
condition: "($tracker == OAM)",
176201
additionalLines: ['#define DEC_STEPPER_SPR (200 * 9)']
177202
},
178203
]
@@ -222,7 +247,7 @@ export const createDECPulleyTeethStep = () => ({
222247
export const createStepperStealthModeStep = () => ({
223248
id: 'STL',
224249
title: 'Stepper Stealth Mode',
225-
label: 'What mode do you want to run the RA and DEC steppers in? If Stealth Mode, they will be inaudible (when not slewing), but have slightly lower performance. In Normal mode, they will make a soft hissing sound, but will have better performance.',
250+
label: 'What mode do you want to run the RA and DEC steppers in? If Stealth Mode, they will be inaudible (when not slewing), but have slightly lower performance. In Normal mode, they will make a soft hissing sound, but will have better performance. \nAZ and ALT are always set to Stealth mode.',
226251
variable: 'stealhmode',
227252
condition: "($radrv == TU) AND ($decdrv == TU)",
228253
preamble: ['// TMC2209 Stealth Mode (spreadCycle) - When set to 0, tracking is more precise, but noisy (high-pitched hissing sound). When set to 1, they are silent.'],

src/modules/configurations/oam/oamSteps.js

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,97 @@ export const getOAMSteps = () => [
146146
]
147147
},
148148
},
149+
{
150+
id: 'ZST',
151+
title: 'Azimuth Stepper',
152+
label: 'Which stepper motor are you using for the Azimuth:',
153+
variable: 'az',
154+
condition: "($autopa == Y)",
155+
preamble: ['// Using the {v} stepper for AZ'],
156+
define: 'AZ_STEPPER_TYPE',
157+
control: {
158+
type: 'radioimg',
159+
choices: [
160+
{ key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' },
161+
{ key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 200.0f'] },
162+
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 2048.0f'] },
163+
]
164+
},
165+
},
166+
{
167+
id: 'ZD',
168+
title: 'Azimuth Driver',
169+
label: 'Which stepper driver are you using to drive the Azimuth stepper motor:',
170+
variable: 'azdrv',
171+
condition: "($autopa == Y)",
172+
preamble: ['// Using the {v} driver for AZ stepper motor'],
173+
define: 'AZ_DRIVER_TYPE',
174+
control: {
175+
type: 'radioimg',
176+
choices: [
177+
{ key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' },
178+
{ key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' },
179+
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' },
180+
]
181+
},
182+
},
183+
{
184+
id: 'ZA',
185+
title: 'Azimuth Advanced Settings',
186+
label: 'These are some advanced settings you may want to override. The defaults are set already. Please only change them if you are sure what they do and what their valid ranges are. Enter the AZ stepper specs and desired settings:',
187+
variable: 'azpower',
188+
condition: "($azdrv == TU)",
189+
preamble: ['// Define AZ stepper motor power settings'],
190+
postamble: [{
191+
literal: [
192+
'#define AZ_STEPPER_SPEED 1000',
193+
'#define AZ_STEPPER_ACCELERATION 500',
194+
'',
195+
'',
196+
'///////////////////////////////',
197+
'// AZ parameters will require tuning according to your setup',
198+
'',
199+
'// If you have a custom solution involving a rod you can uncomment and use the next 3 lines for calculations',
200+
'// #define AZ_CIRCUMFERENCE (115 * 2 * 3.1415927) // the circumference of the circle where the movement is anchored',
201+
'// #define AZ_ROD_PITCH 1.0f // mm per full rev of stepper',
202+
'// #define AZIMUTH_STEPS_PER_REV (AZ_CIRCUMFERENCE / AZ_ROD_PITCH * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Steps needed to turn AZ 360deg',
203+
'',
204+
'// If you have a belt drive solution, you can uncomment and use the next 2 lines for calculations',
205+
'// #define AZ_CIRCUMFERENCE (725) // the circumference of the circle where the movement is anchored',
206+
'// #define AZ_PULLEY_TEETH 16',
207+
'',
208+
'// Is it going the wrong way?',
209+
'#define AZ_INVERT_DIR 0'
210+
]
211+
}],
212+
define: '',
213+
control: {
214+
type: 'textinput',
215+
choices: [
216+
{ key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.az}', defineLine: '#define AZ_MOTOR_CURRENT_RATING {0} // mA' },
217+
{ key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.az}', defineLine: '#define AZ_OPERATING_CURRENT_SETTING {0} // %' },
218+
{ key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.az}', defineLine: '#define AZ_MICROSTEPPING {0} // steps' },
219+
{ key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.az}', defineLine: '#define AZ_MOTOR_HOLD_SETTING {0} // %' },
220+
]
221+
},
222+
},
223+
{
224+
id: 'ZAO',
225+
title: 'Azimuth Always On',
226+
label: 'It is possible to keep the azimuth motor energized at all times to prevent any shifting in position. This is not necessarily needed for 28BYJ motors, however it is recommended for NEMAs when using AutoPA V2.0.',
227+
variable: 'azalwayson',
228+
condition: "($autopa == Y)",
229+
preamble: ['// Define AZ always-on'],
230+
define: 'AZ_ALWAYS_ON',
231+
control: {
232+
type: 'radioimg',
233+
choices: [
234+
{ key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' },
235+
{ key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' },
236+
]
237+
},
238+
},
239+
149240
createStepperStealthModeStep(),
150241
createDisplayStep(),
151242
createInfoDisplayStep(),

0 commit comments

Comments
 (0)