Skip to content

Conversation

@vshekar
Copy link
Collaborator

@vshekar vshekar commented Oct 15, 2025

Removed functions from daq_macros.py which are no longer used or can be rewritten

Removed functions from daq_macros.py which are no longer used or can be
rewritten
Copy link

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 aims to clean up the daq_macros.py file by removing unused or rewritable functions and eliminating an unused import of super_state_machine.

Changes:

  • Removed import of super_state_machine module
  • Removed 13 functions including test utilities, deprecated "Old" versions, and unused raster scanning variants
Comments suppressed due to low confidence (3)

daq_macros.py:1020

  • The function snakeRasterFine is called here but has been removed in this PR. This will cause a NameError at runtime when the scanner type is 'PI'. Either the function needs to be retained or this call needs to be removed/replaced with an alternative implementation.
    snakeRasterFine(rasterReqID,grain)

daq_macros.py:73

  • The global variables autoVectorFlag and autoVectorCoarseCoords are defined but the autoVector function that was their primary consumer has been removed. These variables are still referenced in generateGridMap (lines 1585, 1699). Consider removing these variables if the autoVector functionality is truly deprecated, or keep the autoVector function if the functionality is still needed.
global autoVectorFlag, autoVectorCoarseCoords
autoVectorCoarseCoords = {}
autoVectorFlag=False

daq_macros.py:1475

  • The 'autoVector' raster type is still handled in runRasterScan, but the autoVector function has been removed. This suggests incomplete cleanup - either the autoVector protocol handling should also be removed, or the function should be retained.
  elif (rasterType=="autoVector"):

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

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.

1 participant