@@ -87,14 +87,14 @@ async def get_config(self, timeout: float = 2.0) -> Dict[str, int]:
8787 async def get_ccconf (self , timeout : float = 2.0 ) -> Dict [str , str ]:
8888 """CC1101 configuration registers (C0DnF). Returns a dictionary with the raw string."""
8989 # Response-Pattern aus 00_SIGNALduino.pm, Zeile 86, angepasst an Python regex
90- response = await self ._send_command (command = "C0DnF" , expect_response = True , timeout = timeout , response_pattern = re .compile (r'C0Dn11=[A-F0-9a-f ]+' ))
90+ response = await self ._send_command (command = "C0DnF" , expect_response = True , timeout = timeout , response_pattern = re .compile (r'C0Dn11=[a-f0-9 ]+' , re . IGNORECASE ))
9191 # Kapselt den rohen String, um die MQTT-Antwort konsistent als Dict zurückzugeben
9292 return {"cc1101_config_string" : response }
9393
9494 async def get_ccpatable (self , timeout : float = 2.0 ) -> str :
9595 """CC1101 PA table (C3E)"""
9696 # Response-Pattern aus 00_SIGNALduino.pm, Zeile 88
97- return await self ._send_command (command = "C3E" , expect_response = True , timeout = timeout , response_pattern = re .compile (r'^ C3E\s=\s.*' ))
97+ return await self ._send_command (command = "C3E" , expect_response = True , timeout = timeout , response_pattern = re .compile (r'C3E\s=\s.*' ))
9898
9999 async def factory_reset (self , timeout : float = 5.0 ) -> Dict [str , str ]:
100100 """Sets EEPROM defaults, effectively a factory reset (e).
@@ -264,7 +264,7 @@ async def read_cc1101_register(self, register_address: int, timeout: float = 2.0
264264 """Read CC1101 register (C<reg>)"""
265265 hex_addr = f"{ register_address :02X} "
266266 # Response-Pattern: ccreg 00: oder Cxx = yy (aus 00_SIGNALduino.pm, Zeile 87)
267- return await self ._send_command (command = f"C{ hex_addr } " , expect_response = True , timeout = timeout , response_pattern = re .compile (r'C[A-Fa- f0-9]{2}\s=\s[0-9A-Fa-f ]+|ccreg 00:' ))
267+ return await self ._send_command (command = f"C{ hex_addr } " , expect_response = True , timeout = timeout , response_pattern = re .compile (r'C[a- f0-9]{2}\s=\s[a-f0-9 ]+|ccreg 00:' , re . IGNORECASE ))
268268
269269 async def _get_frequency_registers (self ) -> int :
270270 """Liest die CC1101 Frequenzregister (FREQ2, FREQ1, FREQ0) und kombiniert sie zu einem 24-Bit-Wert (F_REG)."""
0 commit comments