MCPcopy Create free account
hub / github.com/FastLED/FastLED / handle_line

Method handle_line

ci/util/serial_monitor.py:236–248  ·  view source on GitHub ↗
(self, line: str)

Source from the content-addressed store, hash-verified

234 self.mSerialPort = serial_port
235
236 def handle_line(self, line: str) -> bool:
237 if not self.mInputSent and self.mSerialPort and self.mTriggerRegex.search(line):
238 time.sleep(0.1) # Small delay before sending
239 print(
240 f"\n{Fore.GREEN}✅ TRIGGER MATCHED: /{self.mTriggerPattern}/{Style.RESET_ALL}"
241 )
242 print(
243 f"{Fore.GREEN}>>> Sending input: {repr(self.mInputText)}{Style.RESET_ALL}\n"
244 )
245 self.mSerialPort.write((self.mInputText + "\n").encode("utf-8"))
246 self.mSerialPort.flush()
247 self.mInputSent = True
248 return True
249
250
251class SerialMonitor:

Callers

nothing calls this directly

Calls 3

printFunction · 0.50
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected