Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SWC-Advanced-Microscopy/LaserControl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: SWC-Advanced-Microscopy/LaserControl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 11 files changed
  • 2 contributors

Commits on Nov 21, 2019

  1. Configuration menu
    Copy the full SHA
    1400fea View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2020

  1. Configuration menu
    Copy the full SHA
    402fb8a View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2026

  1. Configuration menu
    Copy the full SHA
    53cf82f View commit details
    Browse the repository at this point in the history
  2. Port async serialport laser/AOM refactor from BakingTray (#16, #14)

    NOTE: These changes were made automatically by Claude (Anthropic's Claude Code)
    to bring this repository in line with the laser-control refactor carried out in
    BakingTray, the project this code was originally spawned from. They have not
    been tested on hardware and should be reviewed before release.
    
    Replace the legacy serial()/fopen/fgets transport with MATLAB's serialport
    interface and the async command-queue approach developed on the BakingTray
    laser_power_bug branch. This fixes the button-press-vs-poll serial collisions
    that dropped commands, and modernises the deprecated serial() dependency.
    
    Laser side (issue #16):
    - New laserControl.asyncSerial mixin: single command queue, one terminator
      callback, fire-and-forget enqueueRead for background polling, and a stale
      in-flight watchdog. Uses fprintf for logging (no loghandler dependency).
    - laser base class now inherits asyncSerial and owns a background status
      poller (pollSerial), a faster tuning poller, pause/resume gating so commands
      never interleave with a poll, and emissionPossible. Adds observable
      currentPower_mW / currentPumpPower_mW. Pockels/beamName (BakingTray-only)
      dropped; hAOM and the GUI observable set retained.
    - chameleon and maitai rewritten onto serialport + asyncSerial with per-query
      reply handlers driven from the poll queue.
    
    AOM side:
    - MPDSaom moved onto serialport with synchronous reads (the AOM is command/
      response driven by the wavelength listener, not background-polled, so it does
      not route through the async callback). connect/delete/sendAndReceiveSerial/
      nonStandardSerial/reset updated; the '?'-terminated status read is
      reproduced so the existing regex parsers are unchanged.
    
    Dummy laser (issue #14):
    - Defaults to powered-on with the shutter open and tunes instantly; set
      simulateSlowTuning=true to restore the gradual wavelength ramp.
    
    GUI:
    - laser_view / aom_view updated to serialport-safe buffer checks
      (NumBytesAvailable / flush) guarded for the dummy laser's empty port.
    
    Untested on hardware. The MPDSaom nonStandardSerial trim offsets and the
    serialport reply framing should be checked against a real MPDS driver and a
    real Chameleon/MaiTai before release.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    raacampbell and claude committed Jul 6, 2026
    Configuration menu
    Copy the full SHA
    bb37827 View commit details
    Browse the repository at this point in the history
  3. Make laser_view a passive listener-only view

    NOTE: These changes were made automatically by Claude (Anthropic's Claude Code)
    to bring this repository in line with the laser-control refactor carried out in
    BakingTray, the project this code was originally spawned from. They have not
    been tested on hardware and should be reviewed before release.
    
    The laser class now publishes its state through SetObservable properties and
    runs its own background serial poller, so the GUI no longer needs to poll the
    hardware. laser_view is now purely reactive:
    
    - Removed the GUI's two timers (currentWavelengthTimer, laserViewUpdateTimer)
      and their callbacks (updateCurrentWavelength, regularGUIupdater).
    - Each element repaint is driven by a PostSet listener on the matching
      observable (isLaserOn, isLaserShutterOpen, isLaserConnected,
      isLaserModeLocked, currentPower_mW, currentWavelength, targetWavelength).
    - The element updaters and button callbacks now read the cached observable
      properties instead of issuing serial reads (isShutterOpen/isModeLocked/
      readPower/isPoweredOn). A single readWavelength at construction seeds the
      display; the poller keeps it fresh thereafter.
    - laser_view_si_hooked pauses/resumes the laser's background poller during a
      ScanImage acquisition (previously it stopped the GUI timer), which is the
      real "disable laser updating during scan" behaviour now that the GUI is
      passive. No-op for lasers without a poller (e.g. the dummy laser).
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    raacampbell and claude committed Jul 6, 2026
    Configuration menu
    Copy the full SHA
    a2c49c7 View commit details
    Browse the repository at this point in the history
Loading