cueglow / glowdtf

Tech Demo for Controlling GDTF Lights over Art-Net
MIT License
8 stars 0 forks source link

Refactor GDTF Initialization #61

Open Firionus opened 2 years ago

Firionus commented 2 years ago

The current implementation has some code smells, like functions with many arguments and deep nesting. This might be helped with dedicated "context objects" that only exist during initialization, which might also make it possible to remove the field originalChannelFunction from GlowChannelFunction that is only needed during initialization.

Also, the error handling should be unified. See this note from #58:

A warnings field in the GdtfWrapper should contain non-fatal warnings about the file. In fact, I think we currently throw for a lot of cases where we could just ignore that specific part of the file. Guideline: Parse as much as possible, while not arbitrarily choosing to perform undefined behavior.

This warnings field should also be shown in the UI.