Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeanon committed Jul 12, 2024
2 parents 83b1bed + 730836d commit 0290332
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Beacon Klipper is the klipper module for using the [Beacon](https://beacon3d.com

## Firmware Release Notes

### Beacon 2.1.0 - July 11, 2024
- Added parameters to adjust contact noise tolerance
- Adjusted contact latency values to match new parameters
- Increased robustness of the primary contact trigger

### Beacon 2.0.1 - June 4, 2024
- Fixed USB enumeration issue affecting fast host controllers

Expand Down
26 changes: 26 additions & 0 deletions beacon.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def __init__(self, config):
self.autocal_sample_count = config.getfloat("autocal_sample_count", 3)
self.autocal_tolerance = config.getfloat("autocal_tolerance", 0.008)
self.autocal_max_retries = config.getfloat("autocal_max_retries", 3)
self.contact_latency_min = config.getint("contact_latency_min", 0)
self.contact_sensitivity = config.getint("contact_sensitivity", 0)

self.mcu_temp_wrapper = None
self.coil_temp_wrapper = None
Expand Down Expand Up @@ -163,6 +165,8 @@ def beacon_mcu_stats(eventtime):
self.beacon_contact_home_cmd = None
self.beacon_contact_query_cmd = None
self.beacon_contact_stop_home_cmd = None
self.beacon_contact_set_latency_min_cmd = None
self.beacon_contact_set_sensitivity_cmd = None

# Register z_virtual_endstop
self.printer.lookup_object("pins").register_chip("probe", self)
Expand Down Expand Up @@ -337,6 +341,20 @@ def _build_config(self):
"beacon_contact_stop_home",
cq=self.cmd_queue,
)
try:
self.beacon_contact_set_latency_min_cmd = self._mcu.lookup_command(
"beacon_contact_set_latency_min latency_min=%c",
cq=self.cmd_queue,
)
except msgproto.error:
pass
try:
self.beacon_contact_set_sensitivity_cmd = self._mcu.lookup_command(
"beacon_contact_set_sensitivity sensitivity=%c",
cq=self.cmd_queue,
)
except msgproto.error:
pass

constants = self._mcu.get_constants()

Expand Down Expand Up @@ -2500,6 +2518,14 @@ def home_start(
self.beacon._sample_async()
self._shared.trsync_start(print_time)
etrsync = self._shared._trsync
if self.beacon.beacon_contact_set_latency_min_cmd is not None:
self.beacon.beacon_contact_set_latency_min_cmd.send(
[self.beacon.contact_latency_min]
)
if self.beacon.beacon_contact_set_sensitivity_cmd is not None:
self.beacon.beacon_contact_set_sensitivity_cmd.send(
[self.beacon.contact_sensitivity]
)
self.beacon.beacon_contact_home_cmd.send(
[
etrsync.get_oid(),
Expand Down
Binary file modified firmware/revd.dfu
Binary file not shown.
Binary file modified firmware/revh.dfu
Binary file not shown.

0 comments on commit 0290332

Please sign in to comment.