Skip to main content
Dairy supports configuration by discovery using Sinister. This system allows for a global static instance to be configured just after instantiation by user code. For the moment, nothing exists in Core for users that they need to use this for, but it is used in the Test runtime, and is a useful feature for library authors. Configurable:
Configuration:
The configure method of SettingsConfig will be called when the robot boots up, and it will configure the INSTANCE of Settings.

Overriding Configurations:

A configuration will automatically be overridden if:
  • It was in a dairy library’s package.
  • It was in a library, and your configuration was in TeamCode.
This means that a library can add a configuration for something in Dairy to automatically configure it, and a team can add a configuration to their code to override both other libraries and Dairy. If configurations can’t figure out one single configuration to apply, a warning will be logged out, and it will tell you the offenders, then apply all of them. If you get the warnings, you will need to either add a configuration to TeamCode, to override conflicting library configurations, or you will need to add the offending configurations to a list, and return it via getPrioritisedOver function, which will enforce priorities. If getPrioritisedOver causes any cycles, both will be dropped from usage. Keep an eye out for future use in Dairy, especially for automatically changing configurations for tests!