fix: sensor wiring with auto-naming, START state, and process metrics#5
Draft
im-hashim wants to merge 7 commits into
Draft
fix: sensor wiring with auto-naming, START state, and process metrics#5im-hashim wants to merge 7 commits into
im-hashim wants to merge 7 commits into
Conversation
Sensor name reads (6 sites): check->text() always returned "" — name
is in a Qt property. Fixed all callsites to use property("sensor_name").
Auto sensor naming: ensure_default_name writes sensor_<name>_<n> to
QSettings on enable/add, skipped if user already set a custom name.
START auto-trigger: discoverCarlaSimPids() inside refreshProcessList()
matched orphan pids at startup and set "Initializing" with nothing launching.
Removed from the poll tick; now only called explicitly by START/refresh.
CPU metric: ps pcpu is lifetime-averaged. Replaced with delta from
/proc/<pid>/stat jiffies sampled every 2s via proc_cpu_jiffies().
GPU metric: SM% bar was falling back to VRAM% (different metrics).
Bar now shows SM% only; VRAM MiB stays as the label.
…ncludes - Add explicit static_cast<double>() for float-to-qreal/double conversions throughout codebase to fix Apple Clang -Wdouble-promotion strict warnings - Add missing Qt headers: QStyleHints, QPointer, QGuiApplication - Add [[maybe_unused]] attributes for platform-specific joystick code that's only used inside Linux ifdef guards - Remove unused lambda captures (scenarioLogLine, unused in some contexts) - Suppress -Wc++20-extensions flag (structured bindings only needed for storage, not capture, and are caught by C++17 guard in code) These fixes fixes compilation on macOS while maintaining code quality standards. Platform-specific guards remain for Linux-only features (backtrace, joystick).. have to figure out how to add joystcks for macos via their embedded APIs as it helps mapping better than the /dev/joy. readouts. Fixes compilation errors on macOS without changing build behavior on Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardening pass on the main Studio branch covering build correctness, CLI ergonomics, sensor/process metrics, and remote simulation control.
Build
-Werrorwith-Wconversion,-Wshadow,-Wsign-conversion,-Wdouble-promotion; all callsites brought into complianceCARLA_INSTALL_DIRpassthrough inMakefileqsizetype→intandqint64→doubleconversions acrosscarla_studio.cpp,start_cli.cpp,actuate_cli.cpp, andmesh_aabb.cpp-Wshadowon network stats variables and added[[maybe_unused]]for conditionally-compiled membersstatic_cast<double>()for float-to-qreal promotions flagged by Apple Clang; added missing Qt headersSensor interface
check->text()always returned empty; name is stored in a Qt widget propertyensure_default_namewritessensor_<name>_<n>to QSettings on enable/add, skipped when the user already set a custom nameSimulation control
discoverCarlaSimPids()from the poll tick — it matched orphan pids at startup and set "Initializing" with nothing launching; now called only on explicit START/refreshcarla-studio startandstopcan target a remote host via--host/--portover SSHProcess and system metrics
ps pcpu(lifetime-averaged) with per-pid delta from/proc/<pid>/statjiffies, sampled every 2 sCLI additions
actuate: extended with--backendand--vehicle-blueprintoptionssensor,healthcheck,preview: minor flag and output fixes--preview-live: flag for live sensor preview sessions during developmentConfig
env.inithat were local-only and never intended for the shared branch