-
Notifications
You must be signed in to change notification settings - Fork 5
Implement support for headstage-64 firmware 0.4 #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this 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 }; |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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));;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra semicolons.