@@ -32,6 +32,7 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
3232 showModal : false ,
3333 needsRecovery : false ,
3434 value : lastLine ,
35+ startFromLine : lastLine - 10 >= 0 ? lastLine - 10 : 0 ,
3536 waitForHoming : false ,
3637 safeHeight :
3738 store . get ( 'workspace.units' , METRIC_UNITS ) === METRIC_UNITS
@@ -46,7 +47,7 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
4647 const lineTotal = useSelector ( ( state : RootState ) => state . file . total ) ;
4748
4849 const handleStartFromLine = ( ) => {
49- const { safeHeight, value } = state ;
50+ const { safeHeight, startFromLine } = state ;
5051 const units = store . get ( 'workspace.units' , METRIC_UNITS ) ;
5152
5253 setState ( ( prev ) => ( {
@@ -57,7 +58,7 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
5758
5859 const newSafeHeight =
5960 units === IMPERIAL_UNITS ? safeHeight * 25.4 : safeHeight ;
60- controller . command ( 'gcode:start' , value , zMax , newSafeHeight ) ;
61+ controller . command ( 'gcode:start' , startFromLine , zMax , newSafeHeight ) ;
6162 reduxStore . dispatch (
6263 updateJobOverrides ( { isChecked : true , toggleStatus : 'overrides' } ) ,
6364 ) ;
@@ -106,17 +107,18 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
106107 malfunction, disconnection, or other failure.
107108 </ p >
108109 < p className = "mb-0 text-black dark:text-white" >
109- Your job was last stopped around line:{ ' ' }
110- < b > { lastLine } </ b > on a g-code file with a total
111- of < b > { lineTotal } </ b > lines
110+ Your job of < b > { lineTotal } </ b > lines was last
111+ stopped around line: < b > { lastLine } </ b > .
112112 </ p >
113113 { state . value > 0 && (
114114 < p >
115- Recommended starting lines:{ ' ' }
115+ For best success, we usually recommend
116+ resuming about < strong > 10 lines</ strong > { ' ' }
117+ earlier:{ ' ' }
116118 < strong >
119+ line{ ' ' }
117120 { lastLine - 10 >= 0 ? lastLine - 10 : 0 }
118- </ strong > { ' ' }
119- - < strong > { lastLine } </ strong >
121+ </ strong >
120122 </ p >
121123 ) }
122124 </ div >
@@ -128,7 +130,7 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
128130 < ControlledInput
129131 id = "resumeJobLine"
130132 type = "number"
131- value = { state . value }
133+ value = { state . startFromLine }
132134 onChange = { ( e ) => {
133135 const newValue = Number ( e . target . value ) ;
134136 if (
@@ -137,7 +139,8 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
137139 ) {
138140 setState ( ( prev ) => ( {
139141 ...prev ,
140- value : Math . ceil ( newValue ) ,
142+ startFromLine :
143+ Math . ceil ( newValue ) ,
141144 } ) ) ;
142145 }
143146 } }
@@ -178,7 +181,8 @@ const StartFromLine = ({ disabled, lastLine }: StartFromLineProps) => {
178181 < div className = "mb-4" >
179182 < p className = "text-[#E2943B]" >
180183 Calculates all your CNC movements, attributes,
181- and gS automations to pick up right where you left off.
184+ and gS automations to pick up right where you
185+ left off.
182186 </ p >
183187 </ div >
184188 < div className = "flex justify-center" >
0 commit comments