From ff8d8051728f95ae059f7b1dd6e972f8bd75db69 Mon Sep 17 00:00:00 2001 From: Stefan Dobrev Date: Wed, 29 Apr 2026 12:34:41 +0300 Subject: [PATCH] Allow max angle limit of 0 for stepper mode According to their documentation in [STS3215_Memory_Table_EN.xlsx](https://github.com/alessiodam/python-st3215/blob/main/documents/STS3215_Memory_Table_EN.xlsx): _"When operating in mode 3, the minimum and maximum angle limits for 0x9 and 0xB must be set to 0; otherwise, infinite stepping is not possible."_. However when I try to set the max angle to 0 there is an error because there is a validation that the angle should be greater or equal to 0. This change relaxes this limitation. --- src/python_st3215/registers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python_st3215/registers.py b/src/python_st3215/registers.py index 2862987..86332cd 100644 --- a/src/python_st3215/registers.py +++ b/src/python_st3215/registers.py @@ -235,7 +235,7 @@ def read_max_angle_limit(self) -> Optional[int]: """ return read_word(self.servo, 0x0B) - @validate_value_range(1, 4095) + @validate_value_range(0, 4095) def write_max_angle_limit( self, value: int, reg: bool = False ) -> dict[str, object] | None: