Skip to content

Settings Interfaces should hold settings objects, not full devices #37

@bparks13

Description

@bparks13

Currently the settings tabs that are created hold a shared_ptr to the full device itself. However, in order to show the tabs prior to connecting the hardware, this requires manipulating the device to hold a nullptr instead of a true context, which is not how the object is supposed to be used. This also leads to potential complications where there can be two different places that settings are saved, leading to a desynchronization between what is displayed on the UI and what would actually be written to hardware.

To rectify this, it would probably be best to implement an OnixDeviceSettings class that is the base class for all settings. At a bare minimum, this would include the boolean denoting if the device is enabled or not. Each device can then inherit and expand on the class by adding device-specific settings, such as configuration file paths for Neuropixels. This way, the settings tabs will hold their respective settings objects, and each device will point to the same object so that settings and what is written to hardware is synchronized.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions