diff --git a/public/images/cog40t.png b/public/images/cog40t.png new file mode 100644 index 0000000..fdc0cfc Binary files /dev/null and b/public/images/cog40t.png differ diff --git a/public/images/cog50t.png b/public/images/cog50t.png new file mode 100644 index 0000000..46644a4 Binary files /dev/null and b/public/images/cog50t.png differ diff --git a/public/images/cog60t.png b/public/images/cog60t.png new file mode 100644 index 0000000..3862457 Binary files /dev/null and b/public/images/cog60t.png differ diff --git a/src/modules/WizardStep.jsx b/src/modules/WizardStep.jsx index 67d570f..3a60351 100644 --- a/src/modules/WizardStep.jsx +++ b/src/modules/WizardStep.jsx @@ -175,6 +175,24 @@ const WizardStep = (props) => { return { atEnd: index >= stepProps.length, skip: startIndex !== index, nextIndex: index }; } + useEffect(() => { + if (stepIndex >= 0) { + window.history.replaceState({ stepIndex }, '', window.location.pathname + window.location.search); + } + + const onPopState = (event) => { + if (event.state && typeof event.state.stepIndex === 'number') { + setStepIndex(event.state.stepIndex); + } + }; + + window.addEventListener('popstate', onPopState); + + return () => { + window.removeEventListener('popstate', onPopState); + }; + }, [stepIndex]); + useEffect(() => { let nextStepIndex = stepIndex + 1; const newStepHistory = [...stepHistory, stepIndex]; @@ -192,10 +210,21 @@ const WizardStep = (props) => { }, [advanceStep]); const goBackInHistory = () => { - const newStepIndex = stepHistory[stepHistory.length - 1]; - const newStepHistory = stepHistory.slice(0, -1); - setStepHistory(newStepHistory); - setStepIndex(newStepIndex); + const newStepIndex = stepHistory[stepHistory.length - 1]; + const newStepHistory = stepHistory.slice(0, -1); + const preservedVariables = new Set(); + for (let i = 0; i <= newStepIndex; i++) { + preservedVariables.add(stepProps[i].variable); + } + + //add variable to preserved list + ['autopa', 'autopaversion', 'stepperlib'].forEach(v => preservedVariables.add(v)); + const newConfiguration = configuration.filter(config => preservedVariables.has(config.variable)); + + setConfiguration(newConfiguration); + setStepHistory(newStepHistory); + setStepIndex(newStepIndex); + } const download = (filename, lines) => { @@ -232,7 +261,14 @@ const WizardStep = (props) => { } const onSelect = (index, e) => { - let newConfiguration = configuration.filter(config => config.variable !== stepProps[index].variable) + let newConfiguration; + if (stepProps[index].variable === 'tracker') { + // if user changes tracker, reset configuration + newConfiguration = []; + } else { + // Otherwise, only remove the modified variable + newConfiguration = configuration.filter(config => config.variable !== stepProps[index].variable); + } let newVariables = [{ variable: stepProps[index].variable, value: e }] const chosenOption = stepProps[index].control.choices.find(c => c.key === e); @@ -263,7 +299,16 @@ const WizardStep = (props) => { let prop = stepProps[index]; // console.log("Next step: ", prop) let newConfig = prop.control.choices.map((v) => { return { key: v.key, value: getDefaultValue(v.defaultValue) || '' } }); - let newConfiguration = configuration.filter(config => config.variable !== stepProps[index].variable); + const currentVar = stepProps[index].variable; + let newConfiguration; + if (currentVar === 'tracker') { + newConfiguration = []; + } else if (currentVar === 'board') { + const preservedVars = ['tracker', 'board', 'autopa', 'autopaversion', 'stepperlib']; + newConfiguration = configuration.filter(config => preservedVars.includes(config.variable)); + } else { + newConfiguration = configuration.filter(config => config.variable !== currentVar); + } let newVariables = [{ variable: prop.variable, value: newConfig }] newConfiguration = [...newConfiguration, ...newVariables] setConfiguration(newConfiguration); @@ -275,7 +320,16 @@ const WizardStep = (props) => { let currentConfig = configuration.find(config => config.variable === stepProps[index].variable) || { value: [] }; let newConfig = currentConfig.value.filter(config => config.key !== key); newConfig = [...newConfig, { key: key, value: val }]; - let newConfiguration = configuration.filter(config => config.variable !== stepProps[index].variable); + const currentVar = stepProps[index].variable; + let newConfiguration; + if (currentVar === 'tracker') { + newConfiguration = []; + } else if (currentVar === 'board') { + const preservedVars = ['tracker', 'board', 'autopa', 'autopaversion', 'stepperlib']; + newConfiguration = configuration.filter(config => preservedVars.includes(config.variable)); + } else { + newConfiguration = configuration.filter(config => config.variable !== currentVar); + } newConfiguration = [...newConfiguration, { variable: stepProps[index].variable, value: newConfig }] setConfiguration(newConfiguration); } @@ -354,36 +408,27 @@ const WizardStep = (props) => { return exprResult.bool }) } - let steps = []; - - stepProps.forEach((step, index) => { - let title = step.title; - let description; - if (index < stepIndex) { - let foundConfig = configuration.find(config => config.variable === stepProps[index].variable); - if (foundConfig && !Array.isArray(foundConfig.value)) { - if (stepProps[index].control) { - let foundControl = stepProps[index].control.choices.find(choice => foundConfig.value === choice.key); - if (!foundControl) { - console.log("Could not find control ", foundConfig) - } else { - description = foundControl.value; - } - } - } - } - - let skipState = shouldSkipStep(index); - if ((skipState.skip) && (index < stepIndex)) { - description = "N/A, skipped."; - } - - if ((!skipState.skip) || (index <= stepIndex)) { - steps.push() - } - }); - + stepProps.forEach((step, index) => { + let title = step.title; + let description = "N/A, skipped."; + let foundConfig = configuration.find(config => config.variable === step.variable); + if (foundConfig) { + if (!Array.isArray(foundConfig.value)) { + const control = step.control; + const foundControl = control?.choices?.find(choice => choice.key === foundConfig.value); + if (foundControl) { + description = foundControl.value; + } + } else { + description = 'Custom Value'; + } + let skipState = shouldSkipStep(index); + const showStep = !skipState.skip || index <= stepIndex; + if (showStep) { + steps.push(); + } +}}); steps.push() if (showResult) { @@ -632,9 +677,6 @@ const WizardStep = (props) => {
{control}
-
- -
} diff --git a/src/modules/configurations/base/commonSteps.js b/src/modules/configurations/base/commonSteps.js index 9ae4743..baff7b2 100644 --- a/src/modules/configurations/base/commonSteps.js +++ b/src/modules/configurations/base/commonSteps.js @@ -103,7 +103,7 @@ export const createBoardStep = () => ({ { key: 'M10', value: 'MKS GEN L V1.0', image: '/images/mksv10.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V1' }, { key: 'M20', value: 'MKS GEN L V2.0', image: '/images/mksv20.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V2' }, { key: 'M21', value: 'MKS GEN L V2.1', image: '/images/mksv21.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V21' }, - { key: 'OAEV1', value: 'OAE_V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' }, + { key: 'OAEV1', value: 'OAE V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' }, ] }, }); @@ -119,7 +119,7 @@ export const createRADriverStep = () => ({ control: { type: 'radioimg', choices: [ - { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' }, + { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC', condition: "$tracker == OAT" }, { key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' }, { key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' }, ] @@ -159,28 +159,8 @@ export const createDECStepperStep = () => ({ { key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 200.0f'] }, { key: 'N49', value: 'NEMA 14, 0.9°/step', image: '/images/nema14.png', defineValue: 'STEPPER_TYPE_ENABLED' }, { key: 'N48', value: 'NEMA 14, 1.8°/step', image: '/images/nema14.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 200.0f'] }, - { - key: 'N9O', - value: 'NEMA 17, 0.9°/step', - image: '/images/nema17.png', - defineValue: 'STEPPER_TYPE_ENABLED', - - additionalLines: ['#define DEC_STEPPER_SPR (400 * 9)'] - }, - { - key: 'N8O', - value: 'NEMA 17, 1.8°/step', - image: '/images/nema17.png', - defineValue: 'STEPPER_TYPE_ENABLED', - - additionalLines: ['#define DEC_STEPPER_SPR (200 * 9)'] - }, ] }, - postamble: [{ - literal: ['#define DEC_WHEEL_CIRCUMFERENCE 816.814f'], - - }], }); // DEC Driver step (OAT/OAM) @@ -194,7 +174,7 @@ export const createDECDriverStep = () => ({ control: { type: 'radioimg', choices: [ - { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' }, + { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC', condition: "$tracker == OAT" }, { key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' }, { key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' }, ] @@ -272,9 +252,9 @@ export const createInfoDisplayStep = () => ({ ] }, postamble: [ - { literal: ['#define INFO_DISPLAY_I2C_ADDRESS 0x3C'] }, - { literal: ['#define INFO_DISPLAY_I2C_SDA_PIN 20'] }, - { literal: ['#define INFO_DISPLAY_I2C_SCL_PIN 21'] }, + { literal: ['#define INFO_DISPLAY_I2C_ADDRESS 0x3C'], condition: "($display == YES)", }, + { literal: ['#define INFO_DISPLAY_I2C_SDA_PIN 20'], condition: "($display == YES)", }, + { literal: ['#define INFO_DISPLAY_I2C_SCL_PIN 21'], condition: "($display == YES)", }, { literal: ['// Note that the E1 port is not usable since I2C requires pin 21!'], condition: "($board == M10) OR ($board == M20) OR ($board == M21)", @@ -494,4 +474,257 @@ export const createHallSensorSteps = () => [ ] }, } +]; + +// Auto PA steps (OAT/OAM/OAE) +export const createAutoPASteps = () => [ + { + id: 'AP', + title: 'Auto Polar Align', + label: 'Do you have the AutoPA add on:', + variable: 'autopa', + preamble: ['////////////////////////////////', '// AutoPA Addon configuration ', '// Define whether we have the AutoPA add on or not. Currently: {v}'], + define: '', + control: { + type: 'radioimg', + choices: [ + { key: 'N', value: 'No AutoPA', image: '/images/none.png', additionalLines: ['// No AutoPA settings'] }, + { key: 'Y', value: 'AutoPA is installed', image: '/images/autopa.png' }, + ] + }, + }, + { + id: 'AV', + title: 'AutoPA Version', + label: 'What version of AutoPA do you have installed:', + variable: 'autopaversion', + condition: "($autopa == Y)", + preamble: ['// Using AutoPA {v}.'], + define: '', + control: { + type: 'radioimg', + choices: [ + { key: '1', value: 'V1.0', image: '/images/none.png' }, + { key: '2', value: 'V2.0', image: '/images/none.png', additionalLines: ['#define AUTOPA_VERSION 2'] }, + ] + }, + }, + { + id: 'ZS', + title: 'Azimuth Stepper', + label: 'Which stepper motor are you using for the Azimuth:', + variable: 'az', + condition: "($autopa == Y)", + preamble: ['// Using the {v} stepper for AZ'], + define: 'AZ_STEPPER_TYPE', + control: { + type: 'radioimg', + choices: [ + { key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 2048.0f'], condition: "$tracker != OAM" }, + { key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' }, + { key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 200.0f'] }, + ] + }, + }, + { + id: 'ZD', + title: 'Azimuth Driver', + label: 'Which driver board are you using to drive the Azimuth stepper motor:', + variable: 'azdrv', + condition: "($autopa == Y)", + preamble: ['// Using the {v} driver for AZ stepper motor'], + define: 'AZ_DRIVER_TYPE', + control: { + type: 'radioimg', + choices: [ + { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC', condition: "$tracker != OAM" }, + { key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' }, + { key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' }, + ] + }, + postamble: [{ + condition: '$tracker == OAE', + literal: [ + '#define AZ_MICROSTEPPING 1', + '#define AZ_STEPPER_SPEED 1200', + '#define AZ_STEPPER_ACCELERATION 3000' + ] + }] + }, + { + id: 'ZA', + title: 'Azimuth Advanced Settings', + 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:', + variable: 'azpower', + condition: "$azdrv == TU", + preamble: ['// Define AZ stepper motor power settings'], + postamble: [{ + literal: [ + '#define AZ_STEPPER_SPEED 1000', + '#define AZ_STEPPER_ACCELERATION 500', + '', + '', + '///////////////////////////////', + '// AZ parameters will require tuning according to your setup', + '', + '// If you have a custom solution involving a rod you can uncomment and use the next 3 lines for calculations', + '// #define AZ_CIRCUMFERENCE (115 * 2 * 3.1415927) // the circumference of the circle where the movement is anchored', + '// #define AZ_ROD_PITCH 1.0f // mm per full rev of stepper', + '// #define AZIMUTH_STEPS_PER_REV (AZ_CIRCUMFERENCE / AZ_ROD_PITCH * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Steps needed to turn AZ 360deg', + '', + '// If you have a belt drive solution, you can uncomment and use the next 2 lines for calculations', + '// #define AZ_CIRCUMFERENCE (725) // the circumference of the circle where the movement is anchored', + '// #define AZ_PULLEY_TEETH 16', + '', + '// Is it going the wrong way?', + '#define AZ_INVERT_DIR 0' + ] + }, + { + literal: [ + '', + '// Should AZ motor stay energized?', + '#define AZ_ALWAYS_ON 1', + ], + condition: "$tracker == OAM", + } + ], + define: '', + control: { + type: 'textinput', + choices: [ + { key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.az}', defineLine: '#define AZ_MOTOR_CURRENT_RATING {0} // mA' }, + { key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.az}', defineLine: '#define AZ_OPERATING_CURRENT_SETTING {0} // %' }, + { key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.az}', defineLine: '#define AZ_MICROSTEPPING {0} // steps' }, + { key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.az}', defineLine: '#define AZ_MOTOR_HOLD_SETTING {0} // %' }, + ] + }, + }, + { + id: 'ZAO', + title: 'Azimuth Always On', + 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.', + variable: 'azalwayson', + condition: "($autopa == Y) AND ($tracker == OAT) OR ($tracker == OAE)", + preamble: ['// Define AZ always-on'], + define: 'AZ_ALWAYS_ON', + control: { + type: 'radioimg', + choices: [ + { key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' }, + { key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' }, + ] + }, + }, + { + id: 'LST', + title: 'Altitude Stepper', + label: 'Which stepper motor are you using for the Altitude:', + variable: 'alt', + condition: "($autopa == Y)", + preamble: ['// Using the {v} stepper for ALT'], + define: 'ALT_STEPPER_TYPE', + control: { + type: 'radioimg', + choices: [ + { key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 2048.0f'], condition: "$tracker != OAM" }, + { key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' }, + { key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 200.0f'] }, + ] + }, + postamble: [ + { + condition: '$tracker == OAE', + literal: [ + '// ALT', + '#define ALT_MICROSTEPPING 1', + '#define ALT_STEPPER_SPEED 800', + '#define ALT_STEPPER_ACCELERATION 3000' + ] + }] + }, + { + id: 'LD', + title: 'Altitude Driver', + label: 'Which driver board are you using to drive the Altitude stepper motor:', + variable: 'altdrv', + condition: "($autopa == Y)", + preamble: ['// Using the {v} driver for ALT stepper motor'], + define: 'ALT_DRIVER_TYPE', + control: { + type: 'radioimg', + choices: [ + { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC', condition: "$tracker != OAM" }, + { key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' }, + { key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' }, + ] + }, + }, + { + id: 'LA', + title: 'Altitude Advanced Settings', + 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 ALT stepper specs and desired settings:', + variable: 'altpower', + condition: "$altdrv == TU", + preamble: ['// Define ALT stepper motor power settings'], + define: '', + control: { + type: 'textinput', + choices: [ + { key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.alt}', defineLine: '#define ALT_MOTOR_CURRENT_RATING {0} // mA' }, + { key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.alt}', defineLine: '#define ALT_OPERATING_CURRENT_SETTING {0} // %' }, + { key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.alt}', defineLine: '#define ALT_MICROSTEPPING {0} // steps' }, + { key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.alt}', defineLine: '#define ALT_MOTOR_HOLD_SETTING {0} // %' }, + ] + }, + postamble: [{ + condition: '$tracker == OAM', + literal: [ + '#define ALT_STEPPER_SPEED 3000', + '#define ALT_STEPPER_ACCELERATION 1000', + '', + '///////////////////////////////', + '// ALT parameters are for hardware as designed', + '#define ALTITUDE_STEPS_PER_ARC_MINUTE ((1640 / 60) * ALT_MICROSTEPPING)', + '', + '// Is it going the wrong way?', + '#define ALT_INVERT_DIR 0' + ] + }, + { + condition: '$tracker == OAT', + literal: [ + '#define ALT_STEPPER_SPEED 2000', + '#define ALT_STEPPER_ACCELERATION 1000', + '', + '// Is it going the wrong way?', + '#define ALT_INVERT_DIR 0' + ] + }, + { + condition: '$tracker == OAE', + literal: [ + '', + '// Is it going the wrong way?', + '#define ALT_INVERT_DIR 0' + ] + } + ] + }, + { + id: 'LAO', + title: 'Altitude Always On', + label: 'It is possible to keep the altitude motor energized at all times to prevent any shifting in position. This is usually not needed.', + variable: 'altalwayson', + condition: "($autopa == Y) AND ($tracker == OAT) OR ($tracker == OAE)", + preamble: ['// Define ALT always-on'], + define: 'ALT_ALWAYS_ON', + control: { + type: 'radioimg', + choices: [ + { key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' }, + { key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' }, + ] + }, + } ]; \ No newline at end of file diff --git a/src/modules/configurations/base/sharedDefaults.js b/src/modules/configurations/base/sharedDefaults.js index f55a827..b9326f0 100644 --- a/src/modules/configurations/base/sharedDefaults.js +++ b/src/modules/configurations/base/sharedDefaults.js @@ -46,5 +46,9 @@ export const Defaults = { OAMSpeed: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0, rastpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 }, decstpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 } }, OAMAcceleration: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0, rastpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 }, decstpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 } }, OAMMicrostepping: { N9: 128, N8: 128, N9O: 128, N8O: 128, rastpr: { N9: 128, N8: 128, N9O: 128, N8O: 128 }, decstpr: { N9: 128, N8: 128, N9O: 128, N8O: 128 } }, - RAHallSensorPin: { tracker: 18 } + RAHallSensorPin: { OAT: 53, OAM: 27, OAE: 27 }, + OAEPowerRating: { N9: 1200, N8: 1200, N9O: 2000, N8O: 2000 }, + OAEPowerUtilization: { N9: 80, N8: 80, N9O: 60, N8O: 60 }, + OAESlewMicrostepping: { N9: 4, N8: 4, N9O: 32, N8O: 32 }, + OAETrackMicrostepping: { N9: 256, N8: 256, N9O: 256, N8O: 256 } }; \ No newline at end of file diff --git a/src/modules/configurations/oae/oaeSteps.js b/src/modules/configurations/oae/oaeSteps.js index a99a1f8..229dccb 100644 --- a/src/modules/configurations/oae/oaeSteps.js +++ b/src/modules/configurations/oae/oaeSteps.js @@ -1,5 +1,19 @@ // OAE Configuration Steps -import { createTrackerSelectionStep, createHemisphereStep, createTrackingOnBootStep } from '../base/commonSteps.js'; +import { + createTrackerSelectionStep, + createHemisphereStep, + createBoardStep, + createRADriverStep, + createRAPulleyTeethStep, + createDECDriverStep, + createTrackingOnBootStep, + createStepperStealthModeStep, + createWiFiSteps, + createFocuserSteps, + createHallSensorSteps, + createAutoPASteps +} from '../base/commonSteps.js'; +import { Defaults } from '../base/sharedDefaults.js'; export const getOAESteps = () => [ createTrackerSelectionStep(), @@ -20,138 +34,146 @@ export const getOAESteps = () => [ additionalVariables: [ { 'autopa': 'Y' }, { 'autopaversion': '2' }, - { 'stepperlib': 'N' }, - { 'board': 'OAEV1' } + { 'stepperlib': 'N' } ] }, ] }, }, createHemisphereStep(), + createBoardStep(), { - id: 'BD', - title: 'Board', - label: 'Which microcontroller board are you using:', - variable: 'board', - preamble: ['// We are using the {v} board'], + id: 'RSE', + title: 'RA Stepper', + label: 'Which stepper motor are you using for RA:', + variable: 'rastpr', + preamble: ['////////////////////////////////', '// RA Stepper configuration (OAE)', '// See supported stepper values. Change according to the steppers you are using', '// Using the {v} stepper for RA'], + define: 'RA_STEPPER_TYPE', + control: { + type: 'radioimg', + choices: [ + { key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define RA_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper',] }, + { key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define RA_STEPPER_SPR (200 * 9) // change to (400 * 9) for 0.9° stepper',] }, + ] + }, + }, + createRADriverStep(), + { + id: 'RAE', + title: 'RA Advanced Settings', + 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 RA stepper specs and desired settings:', + variable: 'rapower', + condition: "($radrv == TU)", + preamble: ['// Define some RA stepper motor settings'], + define: '', + control: { + type: 'textinput', + choices: [ + { key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.OAEPowerRating.rastpr}', defineLine: '#define RA_MOTOR_CURRENT_RATING {0} // mA' }, + { key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.OAEPowerUtilization.rastpr}', defineLine: '#define RA_OPERATING_CURRENT_SETTING {0} // %' }, + { key: 'S', label: 'Microstepping while slewing', defaultValue: '{Defaults.OAESlewMicrostepping.rastpr}', defineLine: '#define RA_SLEW_MICROSTEPPING {0}' }, + { key: 'T', label: 'Microstepping while tracking', defaultValue: '{Defaults.OAETrackMicrostepping.rastpr}', defineLine: '#define RA_TRACKING_MICROSTEPPING {0}' }, + ] + }, 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 1200 // mA', - '#define RA_OPERATING_CURRENT_SETTING 80 // %', - '#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 RA_INVERT_DIR 1', '', '// Define some RA stepper motor settings', '', '#define RA_SLEWING_SPEED_DEGREE 3', '#define RA_ACCEL_SecToFullSpeed 1 // 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 60 // %', - '#define DEC_SLEW_MICROSTEPPING 32', - '#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', + '#define RA_STEPPER_ACCELERATION (RA_STEPPER_SPEED / RA_ACCEL_SecToFullSpeed)' + ] + }] + }, + createRAPulleyTeethStep(), + { + id: 'DTE', + title: 'DEC Pulley Teeth', + label: 'How many teeth does your DEC gear have?', + variable: 'deccog', + preamble: ['// Using the {v} for DEC belt'], + define: 'DEC_PULLEY_TEETH', + control: { + type: 'radioimg', + choices: [ + { key: '1', value: '60 tooth gear', image: '/images/cog60t.png', defineValue: '60' }, + { key: '2', value: '50 tooth gear (recommended)', image: '/images/cog50t.png', defineValue: '50' }, + { key: '3', value: '40 tooth gear', image: '/images/cog40t.png', defineValue: '40' }, + ] + }, + }, + { + id: 'DSE', + title: 'DEC Stepper', + label: 'Which stepper motor are you using for DEC:', + variable: 'decstpr', + preamble: ['////////////////////////////////', '// DEC Stepper configuration ', '// See supported stepper values. Change according to the steppers you are using', '// Using the {v} stepper for DEC'], + define: 'DEC_STEPPER_TYPE', + control: { + type: 'radioimg', + choices: [ + { + key: 'N9O', + value: 'NEMA 17, 0.9°/step', + image: '/images/nema17.png', + defineValue: 'STEPPER_TYPE_ENABLED', + additionalLines: ['#define DEC_STEPPER_SPR (400 * DEC_PULLEY_TEETH * 4.5f) // change "200" to "400" for 0.9° stepper'] + }, + { + key: 'N8O', + value: 'NEMA 17, 1.8°/step', + image: '/images/nema17.png', + defineValue: 'STEPPER_TYPE_ENABLED', + additionalLines: ['#define DEC_STEPPER_SPR (200 * DEC_PULLEY_TEETH * 4.5f) // change "400" to "200" for 1.8° stepper'] + }, + ] + }, + postamble: [{ + literal: ['#define DEC_WHEEL_CIRCUMFERENCE 1.0f'], + }], + }, + createDECDriverStep(), + { + id: 'DAE', + title: 'DEC Advanced Settings', + 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 DEC stepper specs and desired settings:', + variable: 'decpower', + condition: "($decdrv == TU)", + preamble: ['// Define some DEC stepper motor settings'], + define: '', + control: { + type: 'textinput', + choices: [ + { key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.OAEPowerRating.decstpr}', defineLine: '#define DEC_MOTOR_CURRENT_RATING {0} // mA' }, + { key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.OAEPowerUtilization.decstpr}', defineLine: '#define DEC_OPERATING_CURRENT_SETTING {0} // %' }, + { key: 'S', label: 'Microstepping while slewing', defaultValue: '{Defaults.OAESlewMicrostepping.decstpr}', defineLine: '#define DEC_SLEW_MICROSTEPPING {0}' }, + { key: 'T', label: 'Microstepping while guiding', defaultValue: '{Defaults.OAETrackMicrostepping.decstpr}', defineLine: '#define DEC_GUIDE_MICROSTEPPING {0}' }, + ] + }, + postamble: [{ + literal: [ '', '// Is it going the wrong way?', '#define DEC_INVERT_DIR 0', - '', '#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 1200', - '#define AZ_STEPPER_ACCELERATION 3000', - '', - '////////////////////////////////', - '// ALT Stepper Configuration', - '#define ALT_STEPPER_SPR 2048 // 28BYJ-48', - '#define ALT_MICROSTEPPING 1', - '#define ALT_STEPPER_SPEED 800', - '#define ALT_STEPPER_ACCELERATION 3000', - '', - '////////////////////////////////', - '// 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 ' + '// #define DEC_PULLEY_TEETH 1' ] - }], - control: { - type: 'radioimg', - choices: [ - { key: 'OAEV1', value: 'OAE_V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' }, - ], - }, + }] }, createTrackingOnBootStep(), -]; + createStepperStealthModeStep(), + ...createWiFiSteps(), + ...createFocuserSteps(), + ...createHallSensorSteps(), + ...createAutoPASteps() +]; \ No newline at end of file diff --git a/src/modules/configurations/oam/oamSteps.js b/src/modules/configurations/oam/oamSteps.js index 32450e5..94adcd5 100644 --- a/src/modules/configurations/oam/oamSteps.js +++ b/src/modules/configurations/oam/oamSteps.js @@ -6,7 +6,6 @@ import { createBoardStep, createRADriverStep, createRAPulleyTeethStep, - createDECStepperStep, createDECDriverStep, createDECPulleyTeethStep, createStepperStealthModeStep, @@ -14,7 +13,8 @@ import { createInfoDisplayStep, createWiFiSteps, createFocuserSteps, - createHallSensorSteps + createHallSensorSteps, + createAutoPASteps } from '../base/commonSteps.js'; import { Defaults } from '../base/sharedDefaults.js'; @@ -103,7 +103,36 @@ export const getOAMSteps = () => [ }, createTrackingOnBootStep(), createRAPulleyTeethStep(), - createDECStepperStep(), + { + id: 'DSM', + title: 'DEC Stepper', + label: 'Which stepper motor are you using for DEC:', + variable: 'decstpr', + preamble: ['////////////////////////////////', '// DEC Stepper configuration ', '// See supported stepper values. Change according to the steppers you are using', '// Using the {v} stepper for DEC'], + define: 'DEC_STEPPER_TYPE', + control: { + type: 'radioimg', + choices: [ + { + key: 'N9O', + value: 'NEMA 17, 0.9°/step', + image: '/images/nema17.png', + defineValue: 'STEPPER_TYPE_ENABLED', + additionalLines: ['#define DEC_STEPPER_SPR (400 * 9)'] + }, + { + key: 'N8O', + value: 'NEMA 17, 1.8°/step', + image: '/images/nema17.png', + defineValue: 'STEPPER_TYPE_ENABLED', + additionalLines: ['#define DEC_STEPPER_SPR (200 * 9)'] + }, + ] + }, + postamble: [{ + literal: ['#define DEC_WHEEL_CIRCUMFERENCE 816.814f'], + }], + }, createDECDriverStep(), { id: 'DAM', @@ -243,5 +272,5 @@ export const getOAMSteps = () => [ ] }, }, - + ...createAutoPASteps() ]; diff --git a/src/modules/configurations/oat/oatSteps.js b/src/modules/configurations/oat/oatSteps.js index acea6c2..79bf817 100644 --- a/src/modules/configurations/oat/oatSteps.js +++ b/src/modules/configurations/oat/oatSteps.js @@ -14,7 +14,8 @@ import { createInfoDisplayStep, createWiFiSteps, createFocuserSteps, - createHallSensorSteps + createHallSensorSteps, + createAutoPASteps } from '../base/commonSteps.js'; import { Defaults } from '../base/sharedDefaults.js'; @@ -215,203 +216,6 @@ export const getOATSteps = () => [ }, }, ...createFocuserSteps(), - { - id: 'APT', - title: 'Auto Polar Align', - label: 'Do you have the AutoPA add on:', - variable: 'autopa', - preamble: ['////////////////////////////////', '// AutoPA Addon configuration ', '// Define whether we have the AutoPA add on or not. Currently: {v}'], - define: '', - control: { - type: 'radioimg', - choices: [ - { key: 'N', value: 'No AutoPA', image: '/images/none.png', additionalLines: ['// No AutoPA settings'] }, - { key: 'Y', value: 'AutoPA is installed', image: '/images/autopa.png' }, - ] - }, - }, - { - id: 'AV', - title: 'AutoPA Version', - label: 'What version of AutoPA do you have installed:', - variable: 'autopaversion', - condition: "($autopa == Y)", - preamble: ['// Using AutoPA {v}.'], - define: '', - control: { - type: 'radioimg', - choices: [ - { key: '1', value: 'V1.0', image: '/images/none.png' }, - { key: '2', value: 'V2.0', image: '/images/none.png', additionalLines: ['#define AUTOPA_VERSION 2'] }, - ] - }, - }, - { - id: 'ZST', - title: 'Azimuth Stepper', - label: 'Which stepper motor are you using for the Azimuth:', - variable: 'az', - condition: "($autopa == Y)", - preamble: ['// Using the {v} stepper for AZ'], - define: 'AZ_STEPPER_TYPE', - control: { - type: 'radioimg', - choices: [ - { key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 2048.0f'] }, - { key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' }, - { key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 200.0f'] }, - ] - }, - }, - { - id: 'ZD', - title: 'Azimuth Driver', - label: 'Which stepper driver are you using to drive the Azimuth stepper motor:', - variable: 'azdrv', - condition: "($autopa == Y)", - preamble: ['// Using the {v} driver for AZ stepper motor'], - define: 'AZ_DRIVER_TYPE', - control: { - type: 'radioimg', - choices: [ - { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' }, - { key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' }, - { key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' }, - ] - }, - }, - { - id: 'ZA', - title: 'Azimuth Advanced Settings', - 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:', - variable: 'azpower', - condition: "($azdrv == TU)", - preamble: ['// Define AZ stepper motor power settings'], - postamble: [{ - literal: [ - '#define AZ_STEPPER_SPEED 1000', - '#define AZ_STEPPER_ACCELERATION 500', - '', - '', - '///////////////////////////////', - '// AZ parameters will require tuning according to your setup', - '', - '// If you have a custom solution involving a rod you can uncomment and use the next 3 lines for calculations', - '// #define AZ_CIRCUMFERENCE (115 * 2 * 3.1415927) // the circumference of the circle where the movement is anchored', - '// #define AZ_ROD_PITCH 1.0f // mm per full rev of stepper', - '// #define AZIMUTH_STEPS_PER_REV (AZ_CIRCUMFERENCE / AZ_ROD_PITCH * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Steps needed to turn AZ 360deg', - '', - '// If you have a belt drive solution, you can uncomment and use the next 2 lines for calculations', - '// #define AZ_CIRCUMFERENCE (725) // the circumference of the circle where the movement is anchored', - '// #define AZ_PULLEY_TEETH 16', - '', - '// Is it going the wrong way?', - '#define AZ_INVERT_DIR 0' - ] - }], - define: '', - control: { - type: 'textinput', - choices: [ - { key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.az}', defineLine: '#define AZ_MOTOR_CURRENT_RATING {0} // mA' }, - { key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.az}', defineLine: '#define AZ_OPERATING_CURRENT_SETTING {0} // %' }, - { key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.az}', defineLine: '#define AZ_MICROSTEPPING {0} // steps' }, - { key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.az}', defineLine: '#define AZ_MOTOR_HOLD_SETTING {0} // %' }, - ] - }, - }, - { - id: 'ZAO', - title: 'Azimuth Always On', - 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.', - variable: 'azalwayson', - condition: "($autopa == Y)", - preamble: ['// Define AZ always-on'], - define: 'AZ_ALWAYS_ON', - control: { - type: 'radioimg', - choices: [ - { key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' }, - { key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' }, - ] - }, - }, - { - id: 'LST', - title: 'Altitude Stepper', - label: 'Which stepper motor are you using for the Altitude:', - variable: 'alt', - condition: "($autopa == Y)", - preamble: ['// Using the {v} stepper for ALT'], - define: 'ALT_STEPPER_TYPE', - control: { - type: 'radioimg', - choices: [ - { key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 2048.0f'] }, - { key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' }, - { key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 200.0f'] }, - ] - }, - }, - { - id: 'LD', - title: 'Altitude Driver', - label: 'Which driver board are you using to drive the Altitude stepper motor:', - variable: 'altdrv', - condition: "($autopa == Y)", - preamble: ['// Using the {v} driver for ALT stepper motor'], - define: 'ALT_DRIVER_TYPE', - control: { - type: 'radioimg', - choices: [ - { key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' }, - { key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' }, - { key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' }, - ] - }, - }, - { - id: 'LA', - title: 'Altitude Advanced Settings', - 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 ALT stepper specs and desired settings:', - variable: 'altpower', - condition: "($altdrv == TU)", - preamble: ['// Define ALT stepper motor power settings'], - define: '', - control: { - type: 'textinput', - choices: [ - { key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.alt}', defineLine: '#define ALT_MOTOR_CURRENT_RATING {0} // mA' }, - { key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.alt}', defineLine: '#define ALT_OPERATING_CURRENT_SETTING {0} // %' }, - { key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.alt}', defineLine: '#define ALT_MICROSTEPPING {0} // steps' }, - { key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.alt}', defineLine: '#define ALT_MOTOR_HOLD_SETTING {0} // %' }, - ] - }, - postamble: [{ - literal: [ - '#define ALT_STEPPER_SPEED 2000', - '#define ALT_STEPPER_ACCELERATION 1000', - '', - '// Is it going the wrong way?', - '#define ALT_INVERT_DIR 0' - ] - }] - }, - { - id: 'LAO', - title: 'Altitude Always On', - label: 'It is possible to keep the altitude motor energized at all times to prevent any shifting in position. This is usually not needed.', - variable: 'altalwayson', - condition: "($autopa == Y)", - preamble: ['// Define ALT always-on'], - define: 'ALT_ALWAYS_ON', - control: { - type: 'radioimg', - choices: [ - { key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' }, - { key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' }, - ] - }, - }, - ...createHallSensorSteps() + ...createHallSensorSteps(), + ...createAutoPASteps() ]; \ No newline at end of file