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

M104 & M109 width PRINTJOB_TIMER_AUTOSTART and printcounter #3809

Closed
MagoKimbra opened this issue May 21, 2016 · 5 comments
Closed

M104 & M109 width PRINTJOB_TIMER_AUTOSTART and printcounter #3809

MagoKimbra opened this issue May 21, 2016 · 5 comments
Assignees
Milestone

Comments

@MagoKimbra
Copy link
Contributor

MagoKimbra commented May 21, 2016

In M104 and M109 width printcounter and enabled PRINTJOB_TIMER_AUTOSTART, call routine PrintCounter::start(). This routine increment the value totalPrints whenever...

I suggest you put a check if it is already running..

void PrintCounter::start() {
  #if ENABLED(DEBUG_PRINTCOUNTER)
    PrintCounter::debug(PSTR("start"));
  #endif

  if (this->isRunning()) return;

  if (!this->isPaused()) this->data.totalPrints++;
  super::start();
}
@MagoKimbra MagoKimbra changed the title M104 & M109 width PRINTJOB_TIMER_AUTOSTART amd printcounter M104 & M109 width PRINTJOB_TIMER_AUTOSTART and printcounter May 21, 2016
@jbrazio
Copy link
Contributor

jbrazio commented May 21, 2016

Good catch I found it for M77 but forgot to check the M104, M109.

@jbrazio jbrazio self-assigned this May 21, 2016
@jbrazio jbrazio added this to the 1.1.0 milestone May 21, 2016
jbrazio added a commit to jbrazio/Marlin that referenced this issue May 22, 2016
@jbrazio
Copy link
Contributor

jbrazio commented May 22, 2016

Fixed, @MagoKimbra please check if it's OK for you.

@jbrazio jbrazio closed this as completed May 22, 2016
@jbrazio jbrazio reopened this May 22, 2016
@MagoKimbra
Copy link
Contributor Author

MagoKimbra commented May 22, 2016

it seems ok..
Only problem is const static uint16_t j = this->saveInterval * 1000;
The variable J must is uint32_t, the max value for uint16_t is 65535.

@jbrazio
Copy link
Contributor

jbrazio commented May 22, 2016

Thanks @MagoKimbra and @esenapaj, submitted PR #3819.

@jbrazio jbrazio closed this as completed May 23, 2016
nomukaiki pushed a commit to nomukaiki/Marlin that referenced this issue 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
  ...
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 16, 2016
CONSULitAS pushed a commit to CONSULitAS/Marlin-K8200 that referenced this issue Aug 18, 2016
@github-actions
Copy link

github-actions bot commented Apr 6, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants