xjjak / LapCal

Building gloves that enable typing on a 34-key keyboard without an actual physical keyboard using IMUs and machine learning.
Other
2 stars 0 forks source link

Configuration mechanism for plot attributes #57

Open palisn opened 1 month ago

palisn commented 1 month ago

Provides simple configuration mechanism for per value attributes and persistent customization across developers.

For more details, see commit message e8f3c8034ab3009311d03d8e4dd0119d08367e3b (for now):

This commit does a few things:

  1. Introduce configuration.rkt which handles all the logical structure concerning configuration management. It provides load-config and write-config to load and write configurations to a provided file path. Additionally, is provides generate-default-config and get-attribute; the former is only used when no configuration is found, the latter is requires the sensor/value selection and the requested attribute and returns the configured value.

    WARNING: the configuration management assumes that every possible combination of sensor, value and attribute is configured in the configuration otherwise it throws an error.

  2. main.rkt:

    • loads config.json if available, generates it if not. Changes in the selection reflect in the rest of the UI. (config.json was added to a local .gitignore)
    • finger/sensor combination was renamed to sensor/value which is physically more accurate and more consistent. (the change might not be consistent with other unupdated files yet)

Further planned changes are: