Skip to content

update tec_status#31

Merged
georgevigelette merged 5 commits intomainfrom
next
Mar 26, 2026
Merged

update tec_status#31
georgevigelette merged 5 commits intomainfrom
next

Conversation

@georgevigelette
Copy link
Copy Markdown
Contributor

update tec-status to support tripping on overheating.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Motion Console TEC status query to use a single OW_CTRL_TEC_STATUS response containing a structured “TecStats” payload, intended to support tripping behavior on overheating.

Changes:

  • Replaces the prior two-step TEC status read (status flag + ADC read) with a single TecStats unpack.
  • Adds TecStats struct parsing (<I4f?) and validates minimum response length.
  • Clears the UART buffer after the TEC status request before parsing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread omotion/Console.py
Comment thread omotion/Console.py
Comment thread omotion/Console.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

@georgevigelette I've opened a new pull request, #32, to work on those changes. Once the pull request is ready, I'll request review from you.

[WIP] [WIP] Address feedback from review on 'update tec_status' pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread omotion/Console.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread omotion/Console.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

omotion/Console.py:1369

  • tec_status now advertises Tuple[str, str, str, str, bool] and returns formatted strings, but in demo mode it still returns numeric floats, and the docstring describes numeric values. This makes the API inconsistent across modes and is a breaking change for callers that previously consumed floats. Prefer returning floats consistently (update the annotation/docstring and return raw floats in both the legacy and TecStats paths), and keep formatting confined to logging/UI layers.
    def tec_status(self) -> Tuple[str, str, str, str, bool]:
        """
        Get TEC status: (voltage, Temperature Setpoint, TEC Current, TEC Voltage, TEC Good)

        Returns:
            tuple: (volt, temp_set, tec_curr, tec_volt, tec_good)

        Raises:
            ValueError: If not connected or response lengths are unexpected.
            Exception:  If the device reports an OW_ERROR.
        """
        try:
            # Demo mode mock
            if getattr(self.uart, "demo_mode", False):
                return (1.0, 0.5, 0.5, 25.0, True)


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread omotion/Console.py Outdated
@georgevigelette georgevigelette merged commit 8ec74bf into main Mar 26, 2026
@georgevigelette georgevigelette deleted the next branch March 26, 2026 19:03
@georgevigelette georgevigelette restored the next branch March 26, 2026 19:03
boringethan pushed a commit that referenced this pull request Apr 2, 2026
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.

4 participants