Skip to content

Conversation

@jonnew
Copy link
Member

@jonnew jonnew commented Oct 9, 2025

  • Remove explicitly ostim and estim trigger delay registers in favor of dynamic delay via trigger register
  • Add the ability to turn off indication LED
  • Fix register values and frame definitions
  • Add persistent heartbeat device to Headstage64 device aggregate
  • Fixes Add support for headstage-64 firmware version 0.4 #516

- Remove explcity ostim and estim trigger delay registers in favor of
  dynamic delay via trigger register
- Add the ability to turn off indication LED
- Fix register values and frame defintions
- Add persistant heartbeat device to Headstage64 device aggregate
@jonnew jonnew requested a review from bparks13 October 9, 2025 19:30
Copy link
Member

@bparks13 bparks13 left a comment

Choose a reason for hiding this comment

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

Overall I have a couple questions that might need to be addressed, see my comments.

I also added the heartbeat tab to the HS64 dialog; this would not be necessary if #517 was implemented, but for now it is needed to see the device added.

[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the heartbeat device in the headstage-64.")]
public ConfigurePersistentHeartbeat Heartbeat { get; set; } = new ConfigurePersistentHeartbeat { BeatsPerSecond = 10 };
Copy link
Member

Choose a reason for hiding this comment

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

In the ConfigurePersistentHeartbeat node, we set the range for the heartbeat to be from 100 to 10 MHz (link). Does this need to be set to 100 or greater?

public bool Enable { get; set; }

/// <summary>
/// Gets or sets the device enable state.
Copy link
Member

Choose a reason for hiding this comment

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

Should we re-word this summary? Work in the fact that it covers both the power supplies being turned on and whether or not the device will respect triggers?

device.WriteRegister(Headstage64ElectricalStimulator.STIMENABLE, value ? 3u : 0u)),
phaseOneCurrent.SubscribeSafe(observer, value =>
device.WriteRegister(Headstage64ElectricalStimulator.CURRENT1, Headstage64ElectricalStimulator.MicroampsToCode(value))),
interPhaseCurrent.SubscribeSafe(observer, value =>
Copy link
Member

Choose a reason for hiding this comment

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

Was the interPhaseCurrent supposed to be taken out? The BehaviorSubject and the property for inter-phase interval and current are still present in the operator.

}

/// <summary>
/// Gets or sets the device enable state.
Copy link
Member

Choose a reason for hiding this comment

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

Same question as the ElectricalStimulator.StimEnable above

delay.SubscribeSafe(observer, value =>
device.WriteRegister(Headstage64OpticalStimulator.TRAINDELAY, (uint)(1000 * value))),
DeviceManager.RegisterDevice(deviceName, device, DeviceType));
DeviceManager.RegisterDevice(deviceName, device, DeviceType));;;
Copy link
Member

Choose a reason for hiding this comment

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

Extra semicolons.

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.

Add support for headstage-64 firmware version 0.4

3 participants