8000 feat: add CLI arguments for device connection by avionicharshit-byte · Pull Request #323 · Serial-Studio/Serial-Studio · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@avionicharshit-byte
Copy link
Contributor

Adds command-line argument support for launching Serial Studio with automatic device connection and project loading.

Feature Request #266

Changes

  • Replaced basic argument parsing with QCommandLineParser in app/src/main.cpp
  • Added --device <path> to specify serial device
  • Added --baud <rate> to set baud rate
  • Added --project <file> to load project file on startup
  • Maintained backward compatibility with existing -v/-r flags

Usage Examples

# Connect to serial device
./SerialStudio --device /dev/ttyUSB0 --baud 115200

# Load project file
./SerialStudio --project myproject.json

# Combine both
./SerialStudio --project myproject.json --device /dev/ttyUSB0 --baud 115200

Testing

- ✅ Code verified against existing APIs
- ✅ Backward compatibility maintained
- ⏳ Requires more testing with actual hardware/project files

Notes

- Device connection is established automatically before the event loop starts
- Invalid baud rates display a warning but don't prevent startup

@CLAassistant
Copy link
CLAassistant commented Nov 20, 2025

CLA assistant check
All committers have signed the CLA.

@avionicharshit-byte
Copy link
Contributor Author

@alex-spataru can you review this ?

@alex-spataru
Copy link
Member

Thank you so much for this!

I plan to expand on this code in the future to add support for device listing and selection for different IO Drivers, it definitely would help for many usage cases.

Merging...

@alex-spataru alex-spataru merged commit c4961aa into Serial-Studio:master Nov 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0