Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Comments

66 task add the lights and gear subscriber to the qt app#68

Merged
Rui-Pedro-Pires merged 18 commits intodevfrom
66-task-add-the-lights-and-gear-subscriber-to-the-qt-app
Jan 21, 2025
Merged

66 task add the lights and gear subscriber to the qt app#68
Rui-Pedro-Pires merged 18 commits intodevfrom
66-task-add-the-lights-and-gear-subscriber-to-the-qt-app

Conversation

@Rui-Pedro-Pires
Copy link
Contributor

Pull Request Overview

Description

This pull request includes several changes to the InstrumentCluster application, focusing on refactoring the codebase, updating the InstrumentCluster class, and modifying related files to improve functionality and maintainability.

Refactoring and code improvements:

  • src/InstrumentCluster.cpp: Refactored the InstrumentCluster constructor to initialize subscribers for speed, battery, lights, and gear, and updated the Session object initialization.
  • include/InstrumentCluster.hpp: Introduced new LightStatus, BatteryStatus, and GearPosition structs, and updated the InstrumentCluster class to use these structs for properties and signals.
  • src/main.cpp: Simplified the main function by removing individual signal handlers and delegating the responsibilities to the InstrumentCluster class.

Submodule and build system updates:

  • .gitmodules: Removed the MiddleWare/Libs submodule.
  • CMakeLists.txt: Updated the executable target name from InstrumentCluster to InstrumentClusterApp and included the include directory.

Functional changes:

  • MiddleWare/src/main.cpp: Updated the battery calculation logic to use a double for more accurate percentage representation and clamping the value between 0 and 100.

UI updates:

  • ui/GearShiftInfo.qml: Updated the gear shift indicator to dynamically change colors based on the current gear position.

These changes collectively enhance the structure, readability, and functionality of the InstrumentCluster application.

Type of Change

  • 🐞 Bugfix (fixes an issue)
  • ✨ New Feature (introduces new functionality)
  • 📄 Documentation (adds or updates documentation)
  • 🔧 Configuration (adjusts project configuration or tooling)

Checklist

  • Code is thoroughly tested and operates as expected
  • Documentation has been updated to reflect these changes (if applicable)
  • No breaking changes introduced

Related Issues

Additional Context


Reviewer Checklist

  • Code follows project style and naming conventions.
  • No functionality is broken; code is well-tested.
  • Documentation and comments are clear.
  • No security vulnerabilities or performance issues are introduced.

mjorgecruz and others added 18 commits January 7, 2025 10:54
…memcpy calls to use as_string() for payload handling
…nt directly; adjust include paths for InstrumentCluster
…atteryStatus type; update related methods and QML bindings
…use BatteryStatus struct and improve light status properties
…gear display and improve light visibility handling
…gration; update gear handling in InstrumentCluster and related QML bindings
@Rui-Pedro-Pires Rui-Pedro-Pires linked an issue Jan 21, 2025 that may be closed by this pull request
@Rui-Pedro-Pires Rui-Pedro-Pires self-assigned this Jan 21, 2025
@Rui-Pedro-Pires Rui-Pedro-Pires merged commit f8a2af1 into dev Jan 21, 2025
1 check passed
@Rui-Pedro-Pires Rui-Pedro-Pires deleted the 66-task-add-the-lights-and-gear-subscriber-to-the-qt-app branch February 24, 2025 13:38
Rui-Pedro-Pires added a commit that referenced this pull request Aug 5, 2025
…subscriber-to-the-qt-app

66 task add the lights and gear subscriber to the qt app
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Add the lights and gear subscriber to the qt app

3 participants