Skip to content

Commit 13c011e

Browse files
authored
Merge pull request #527 from jimmyjon711/issue_526
[Bug] Fixes #526, Adding a check for a single parameter since older klipper versions note_filament_present function is different
2 parents f6d01bb + 4369be9 commit 13c011e

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2025-09-09]
9+
### Fixes
10+
- Issue with older klipper version before debounce button was added
11+
812
## [2025-08-30]
913
### Added
1014
- Catch for JSON decode error when trying to read and load AFC.var.unit file

extras/AFC.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
try: from extras.AFC_stats import AFCStats
2828
except: raise error(ERROR_STR.format(import_lib="AFC_stats", trace=traceback.format_exc()))
2929

30-
AFC_VERSION="1.0.29"
30+
AFC_VERSION="1.0.30"
3131

3232
# Class for holding different states so its clear what all valid states are
3333
class State:

extras/AFC_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def __init__(self, config, filament_sensor):
9999
self.button_action = self._old_note_filament_present
100100
# Overriding filament sensor filament present to button handler in this class
101101
# Checking parameter length since kalico's note_filament_present function is different
102-
if len(sig.parameters) > 2:
102+
# and also checking for older klipper versions before hash 272e8155
103+
if len(sig.parameters) > 2 or len(sig.parameters) == 1:
103104
filament_sensor.runout_helper.note_filament_present = self.button_handler
104105
else:
105106
filament_sensor.runout_helper.note_filament_present = self._button_handler

0 commit comments

Comments
 (0)