@@ -31,6 +31,15 @@ const printerPresets = {
3131 xHomeDir : - 1 ,
3232 yHomeDir : - 1 ,
3333 zHomeDir : - 1
34+ } ,
35+ 'ender5pro' : {
36+ name : 'Ender 5 Pro' ,
37+ xBedSize : 220 ,
38+ yBedSize : 220 ,
39+ zMaxPos : 300 ,
40+ xHomeDir : - 1 ,
41+ yHomeDir : - 1 ,
42+ zHomeDir : 1
3443 }
3544} ;
3645
@@ -97,6 +106,13 @@ const wizardState = {
97106 invertB : false ,
98107 invertE : false ,
99108
109+ // Step 4: Endstop hit state (HIGH = NO, LOW = NC)
110+ endstopX : 'HIGH' ,
111+ endstopY : 'HIGH' ,
112+ endstopZ : 'HIGH' ,
113+ endstopC : 'HIGH' ,
114+ endstopB : 'LOW' ,
115+
100116 // Step 6: Kinematics
101117 ikLC : 2.30 ,
102118 ikLB : 52.87 ,
@@ -223,7 +239,12 @@ function setupInputListeners() {
223239 { id : 'socketZ' , key : 'socketZ' } ,
224240 { id : 'socketC' , key : 'socketC' } ,
225241 { id : 'socketB' , key : 'socketB' } ,
226- { id : 'socketE' , key : 'socketE' }
242+ { id : 'socketE' , key : 'socketE' } ,
243+ { id : 'endstopX' , key : 'endstopX' } ,
244+ { id : 'endstopY' , key : 'endstopY' } ,
245+ { id : 'endstopZ' , key : 'endstopZ' } ,
246+ { id : 'endstopC' , key : 'endstopC' } ,
247+ { id : 'endstopB' , key : 'endstopB' }
227248 ] ;
228249
229250 selectInputsString . forEach ( ( { id, key } ) => {
@@ -547,6 +568,7 @@ function formatPrinterName(value) {
547568 'ender3v3se' : 'Ender 3 V3 SE' ,
548569 'ender3pro' : 'Ender 3 Pro' ,
549570 'ender3v2' : 'Ender 3 V2' ,
571+ 'ender5pro' : 'Ender 5 Pro' ,
550572 'custom' : 'Custom'
551573 } ;
552574 return names [ value ] || value ;
@@ -695,6 +717,12 @@ async function buildFirmware() {
695717 invertC : config . invertC ,
696718 invertB : config . invertB ,
697719 invertE : config . invertE ,
720+ // Endstop hit states
721+ endstopX : config . endstopX ,
722+ endstopY : config . endstopY ,
723+ endstopZ : config . endstopZ ,
724+ endstopC : config . endstopC ,
725+ endstopB : config . endstopB ,
698726 // IK parameters
699727 ikLC : config . ikLC ,
700728 ikLB : config . ikLB ,
@@ -1024,6 +1052,13 @@ function applyImportedConfig(config) {
10241052 if ( el ) el . checked = config [ field ] ;
10251053 } ) ;
10261054
1055+ // === Endstop hit states ===
1056+ const endstopFields = [ 'endstopX' , 'endstopY' , 'endstopZ' , 'endstopC' , 'endstopB' ] ;
1057+ endstopFields . forEach ( field => {
1058+ const el = document . getElementById ( field ) ;
1059+ if ( el && config [ field ] ) el . value = config [ field ] ;
1060+ } ) ;
1061+
10271062 // === IK Parameters ===
10281063 document . getElementById ( 'ikLC' ) . value = config . ikLC ;
10291064 document . getElementById ( 'ikLB' ) . value = config . ikLB ;
0 commit comments