-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.