mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 16:57:55 -06:00
mcu: Support minclock in send_with_response() requests
Enhance send_with_response() so that it supports queries with a minclock. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
e202a8802b
commit
9feb05ce41
3 changed files with 27 additions and 11 deletions
|
@ -131,6 +131,9 @@ class ClockSync:
|
|||
def get_clock(self, eventtime):
|
||||
sample_time, clock, freq = self.clock_est
|
||||
return int(clock + (eventtime - sample_time) * freq)
|
||||
def estimate_clock_systime(self, reqclock):
|
||||
sample_time, clock, freq = self.clock_est
|
||||
return float(reqclock - clock)/freq + sample_time
|
||||
def estimated_print_time(self, eventtime):
|
||||
return self.clock_to_print_time(self.get_clock(eventtime))
|
||||
# misc commands
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue