bunch of training and label latency fixes, also trained 70% accurate model.
This commit is contained in:
@@ -99,13 +99,13 @@ class RealSerialStream:
|
||||
@note Requires pyserial: pip install pyserial
|
||||
"""
|
||||
|
||||
def __init__(self, port: str = None, baud_rate: int = 115200, timeout: float = 1.0):
|
||||
def __init__(self, port: str = None, baud_rate: int = 921600, timeout: float = 0.05):
|
||||
"""
|
||||
@brief Initialize the serial stream.
|
||||
|
||||
@param port Serial port name (e.g., 'COM3' on Windows, '/dev/ttyUSB0' on Linux).
|
||||
If None, will attempt to auto-detect the ESP32.
|
||||
@param baud_rate Communication speed in bits per second. Default 115200 matches ESP32.
|
||||
@param baud_rate Communication speed in bits per second. Default 921600 for high-throughput streaming.
|
||||
@param timeout Read timeout in seconds for readline().
|
||||
"""
|
||||
self.port = port
|
||||
@@ -233,6 +233,9 @@ class RealSerialStream:
|
||||
"Must call connect() first."
|
||||
)
|
||||
|
||||
# Flush any stale data before starting fresh stream
|
||||
self.serial.reset_input_buffer()
|
||||
|
||||
# Send start command
|
||||
start_cmd = {"cmd": "start"}
|
||||
self._send_json(start_cmd)
|
||||
|
||||
Reference in New Issue
Block a user