Skip to content

Commit

Permalink
Fixed an error with low fan speed displaying a 100% graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyLaurenson committed Mar 6, 2022
1 parent c57775d commit 93c9dd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ dist
*.egg*
.DS_Store
*.zip
startdev.sh
startdeveloping.sh

3 changes: 2 additions & 1 deletion octoprint_emc2101/static/js/emc2101.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,10 @@ $(function() {
lotemp=lotemp-offset;

temp=parseFloat(tempR);
if(temp<lotemp)temp=lotemp;
temp=(temp-lotemp)*100/(hitemp-lotemp);
if(temp>100)temp=100;
if(temp<0)temp=0;
if(temp<0.01)temp=0.01;
if (temp && !isNaN(temp)) {
return (self.tempGaugePathLen() * (1 - temp / 100)).toFixed(2);
} else return (self.tempGaugePathLen() * 0.01);
Expand Down

0 comments on commit 93c9dd5

Please sign in to comment.