Skip to content

feat: ported sensors screen #2789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: flutter
Choose a base branch
from

Conversation

Yugesh-Kumar-S
Copy link
Collaborator

@Yugesh-Kumar-S Yugesh-Kumar-S commented Jul 16, 2025

Fixes #2788 (Still under progress )

Changes

  • Ported sensors screen

Screenshots / Recordings

Screenshot_20250716-231832

Checklist:

  • No hard coding: I have used resources from strings.xml, dimens.xml and colors.xml without hard coding any value.
  • No end of file edits: No modifications done at end of resource files strings.xml, dimens.xml or colors.xml.
  • Code reformatting: I have reformatted code and fixed indentation in every file included in this pull request.
  • No extra space: My code does not contain any extra lines or extra spaces than the ones that are necessary.

Summary by Sourcery

Port the sensors screen into the Flutter app UI and hook it into the navigation flow.

New Features:

  • Port SensorsScreen with autoscan functionality, connection status display, and sensor selection list
  • Add '/sensors' route in main.dart and integrate navigation to the sensors screen from the instruments screen

Copy link

sourcery-ai bot commented Jul 16, 2025

Reviewer's Guide

This PR introduces a fully-ported Sensors screen by adding a new StatefulWidget with autoscan logic and integrates it into the app’s navigation flow.

Sequence diagram for navigation to Sensors screen

sequenceDiagram
    actor User
    participant InstrumentsScreen
    participant Navigator
    participant SensorsScreen
    User->>InstrumentsScreen: Selects Sensors tab
    InstrumentsScreen->>Navigator: pushNamedAndRemoveUntil('/sensors')
    Navigator->>SensorsScreen: Build SensorsScreen
Loading

File-Level Changes

Change Details Files
Implemented new Sensors screen with UI and autoscan functionality
  • Created SensorsScreen widget with CommonScaffold setup
  • Built status display and ‘AUTOSCAN’ button tied to provider state
  • Populated sensor list UI and tap handlers
  • Implemented _performAutoscan to detect and list sensors
lib/view/sensors_screen.dart
Integrated Sensors screen into app navigation
  • Imported SensorsScreen in main.dart and added '/sensors' route
  • Extended InstrumentsScreen switch-case to navigate to sensors path
lib/main.dart
lib/view/instruments_screen.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#2788 Port the sensors screen to a new implementation.
#2788 Implement individual screens for each sensor data. The PR ports the sensors screen but does not implement individual screens for each sensor data. The ported screen includes an autoscan feature to detect connected sensors, but tapping on a sensor does not navigate to an individual screen for that sensor's data.

Possibly linked issues

  • Port sensors screen. #2788: The PR ports the sensors screen, matching the issue's request to implement the sensors screen UI and logic.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

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.

Port sensors screen.
1 participant