Skip to content

Commit

Permalink
Update generator.cs
Browse files Browse the repository at this point in the history
There was a bug (actually wrong equation) on generator run_time print on the UI.
Example given:
Previously it was shown as 2:145 for run_time value of: 8710 (which is in seconds.) After my proposed change, it will be displayed correctly as: 2:25 for same run_time value.
  • Loading branch information
onurerden authored and meee1 committed Dec 9, 2022
1 parent e2c9cda commit ab35f9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ public override bool Loop()
MainV2.instance.BeginInvoke((MethodInvoker)delegate
{
gen.aGaugeSpeed.Value1 = (float)(generator_speed / 1000.0);
uint min = (run_time) / 60;
uint min = ((run_time) / 60) % 60;
uint hour = ((run_time) / 3600);
gen.runTimeTxt.Text = hour.ToString("D4") + ":" + min.ToString("D2");
int nhour = timemaint / 3600;
Expand Down Expand Up @@ -468,4 +468,4 @@ public override bool Exit()
}
}
}
}
}

0 comments on commit ab35f9f

Please sign in to comment.