ulfsri/pyGascard

Better dictionaries/JSON

Closed this issue ยท 1 comments

๐Ÿš€ Feature Request

Rewrite JSON dictionaries similar to the format seen in the OMRON module.
That is, {Modes (N, C1, E1, etc.) : {Labels : Setting Code}}.
There will be only a single dictionary that everything uses for labeling dictionaries and finding addresses to get/set the appropriate parameters.

๐Ÿ”ˆ Motivation

Removes a lot of variables (N_labels, N1_labels, values, etc.) and makes it easier to change in the future instead of worrying about multiple locations.

๐Ÿ›ฐ Alternatives

๐Ÿ“Ž Additional context

image

I condensed the values dictionary into the JSon file. Would you like me to remove the " N_labels = values["N"][0] " lines? I can either leave it like it is above or do " zip(values["N"][0], df) " for each function. Both are fine with me, one is slightly more condensed the other is slightly more readable.