Skip to content

pressure FFI#2561

Merged
t-b merged 1 commit intomainfrom
feature/2546-pressureFFI
Feb 4, 2026
Merged

pressure FFI#2561
t-b merged 1 commit intomainfrom
feature/2546-pressureFFI

Conversation

@timjarsky
Copy link
Copy Markdown
Collaborator

Resolves Get and Set of #2546

@timjarsky timjarsky self-assigned this Nov 4, 2025
Copilot AI review requested due to automatic review settings November 4, 2025 20:26
Copy link
Copy Markdown

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

This PR implements a Foreign Function Interface (FFI) for pressure control operations, resolving get and set functionality for issue #2546. The changes refactor pressure control code by moving constants to a centralized location, promoting internal functions to public API functions, and adding new FFI functions for external pressure control.

Key changes:

  • Moved pressure-related constants (ATMOSPHERIC_PRESSURE, ACCESS_*) from MIES_PressureControl.ipf to MIES_Constants.ipf for better code organization
  • Changed four internal pressure control functions to public API by removing static keywords
  • Added new FFI functions FFI_GetWithOptionToSetPressure() and FFI_WaitForIdle() for external pressure control operations
  • Renamed P_GetPressureMode() to P_GetPressureMethod() for consistency

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
MIES_PressureControl.ipf Removed pressure constants, promoted four functions from static to public, removed old DoPressureManual(), renamed P_GetPressureMode() to P_GetPressureMethod()
MIES_ForeignFunctionInterface.ipf Added FFI functions for pressure control including FFI_GetWithOptionToSetPressure(), FFI_WaitForIdle(), and several test functions
MIES_DAEphys.ipf Updated function call from P_GetPressureMode() to P_GetPressureMethod()
MIES_Constants.ipf Added pressure constants previously in MIES_PressureControl.ipf

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

Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf Outdated
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf Outdated
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf Outdated
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf Outdated
@campagnola
Copy link
Copy Markdown
Member

FFI_GetWithOptionToSetPressure accepts NaN as one of its arguments, but Igor complains that the json is invalid if I try to send a NaN.

@t-b
Copy link
Copy Markdown
Collaborator

t-b commented Dec 10, 2025

FFI_GetWithOptionToSetPressure accepts NaN as one of its arguments, but Igor complains that the json is invalid if I try to send a NaN.

https://github.com/AllenInstitute/ZeroMQ-XOP/#specification explains how to write NaN.

@timjarsky
Copy link
Copy Markdown
Collaborator Author

@t-b, this branch is working well on Rig 5. I'd like to get it merged with your help/advice.

Copilot AI review requested due to automatic review settings February 2, 2026 19:19
@t-b t-b force-pushed the feature/2546-pressureFFI branch from 6f27bbd to 50d1528 Compare February 2, 2026 19:19
@t-b
Copy link
Copy Markdown
Collaborator

t-b commented Feb 2, 2026

@timjarsky I've squashed and rebased. Will merge once CI passes.

@t-b t-b enabled auto-merge February 2, 2026 19:20
@t-b t-b removed their assignment Feb 2, 2026
Copy link
Copy Markdown

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 4 out of 4 changed files in this pull request and generated 11 comments.


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

Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_PressureControl.ipf
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_ForeignFunctionInterface.ipf
Comment thread Packages/MIES/MIES_PressureControl.ipf
Comment thread Packages/MIES/MIES_PressureControl.ipf
@t-b t-b disabled auto-merge February 4, 2026 19:43
@t-b t-b enabled auto-merge February 4, 2026 19:43
@t-b t-b merged commit 206418c into main Feb 4, 2026
73 of 78 checks passed
@t-b t-b deleted the feature/2546-pressureFFI branch February 4, 2026 22:08
@t-b t-b mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants