Refine feedrate preview

Very slightly but better
This commit is contained in:
lawgicau
2021-07-21 11:10:01 +10:00
parent 191f1837a6
commit d22c6106ef
2 changed files with 2 additions and 3 deletions

View File

@ -230,7 +230,7 @@ var retractionTower = /*html*/ `<h4>Retraction</h4>
var feedrate = /*html*/ `<h4>Feedrate</h4>
<p>The default printing speed is 60 mm/sec, with modifiers including 60% for perimeters, 80% for solid infill, travel moves 166%, and 50% of these for the first layer. Modify the base feedrate here and the generated gcode will be modified using the same proportions (<b>calculated feedrates shown in grey</b>). Please note extruder retraction/unretraction and Z-hop speeds will be unaffected by this.</p>
<p><label>Base feedrate (mm/sec): <input type="number" name="baseFeedrate" value="60" min="5" max="1000" step="1" onchange="updateFeeds(form);"></label>
<p><label>Base feedrate (mm/sec): <input type="number" name="baseFeedrate" value="60" min="5" max="1000" step="1" onchange="updateFeeds(this.value);"></label>
<span class="summary">Perimeters: <b><span class="perimFeed">36</span> mm/s</b></span><span class="summary">Solid infill: <b><span class="solidFeed">48</span> mm/s</b></span><span class="summary">Travel moves: <b><span class="travelFeed">100</span> mm/s</b></span><span class="summary">First layer: <b><span class="firstFeed">30</span> mm/s</b></span></p>
`;

View File

@ -103,8 +103,7 @@ function toggleJ() {
}
}
function updateFeeds(formName) {
var feedrate = formName.baseFeedrate.value;
function updateFeeds(feedrate) {
$('.perimFeed').html(Math.round(feedrate*0.6));
$('.solidFeed').html(Math.round(feedrate*0.8));
$('.travelFeed').html(Math.round(feedrate*1.67));