Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopwatch and PrintCounter improvements #3813

Merged
merged 1 commit into from
May 22, 2016

Conversation

jbrazio
Copy link
Contributor

@jbrazio jbrazio commented May 22, 2016

Fixes #3809 and adds several improvements to the Stopwatch and PrintCounter classes.

@jbrazio jbrazio added this to the 1.1.0 milestone May 22, 2016
@thinkyhead thinkyhead merged commit f9b4b90 into MarlinFirmware:RCBugFix May 22, 2016
@jbrazio jbrazio deleted the bugfix/3809 branch May 22, 2016 01:35
@MagoKimbra
Copy link
Contributor

const static uint16_t j = this->saveInterval * 1000;

This variable must is uint32_t. The max valor width uint16_t 65536

this->data.finishedPrints++;
this->data.printTime += this->deltaDuration();
this->saveStats();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a compilation warning.

AppData\Local\Temp\builde7989c12e25d478367e8a5397818719d.tmp\sketch\printcounter.cpp: In member function 'bool PrintCounter::stop()':

AppData\Local\Temp\builde7989c12e25d478367e8a5397818719d.tmp\sketch\printcounter.cpp:169:1: warning: control reaches end of non-void function [-Wreturn-type]

 }

 ^

Then, is

  if (super::stop()) {
    this->data.finishedPrints++;
    this->data.printTime += this->deltaDuration();
    this->saveStats();
    return true;
  }
  else return false;

better?

jbrazio added a commit to jbrazio/Marlin that referenced this pull request May 22, 2016
@jbrazio jbrazio mentioned this pull request May 22, 2016
thinkyhead added a commit that referenced this pull request May 23, 2016
nomukaiki pushed a commit to nomukaiki/Marlin that referenced this pull request May 27, 2016
* RCBugFix: (34 commits)
  set_z parameters marked const
  EEPROM report uses G29 S3
  Propose simpler probe index methods
  Propose simpler cel index methods
  Small reduction in M421 code
  Two index finding functions for MBL
  Rename CORE_AXIS_3 to NORMAL_AXIS
  COREYZ stepper, planner, endstop, babysteps
  COREYZ Conditionals, SanityCheck for only a single kinematic
  Add option for CoreYZ kinematics
  Cleanup the Marlin logo with a hires svg version
  Correct hardware endstops default
  Followup for MarlinFirmware#3813
  Fixes MarlinFirmware#3809 and adds several improvements to the Stopwatch and PrintCounter classes
  Additional instructions for controller reverse options
  PID_ADD_EXTRUSION_RATE based on MarlinKimbra
  Conditionals and Sanity Check for SINGLENOZZLE
  Add "SINGLENOZZLE" extruder option
  Extend M421 with I and J parameters
  Travis CI test for MBL
  ...
@thinkyhead thinkyhead mentioned this pull request Jul 8, 2016
CONSULitAS pushed a commit to CONSULitAS/Marlin-K8200 that referenced this pull request Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants