sde1000 / python-dali

Library for controlling DALI lighting systems
Other
150 stars 73 forks source link

Command tracker fix + hash for frame #33

Closed caiwan closed 7 years ago

caiwan commented 8 years ago

I've fixed command tracker and added a test case for them. Also added a hash method for Frames.

sde1000 commented 8 years ago

Hmm. My original intent was for the list of commands to be kept in the Command class not the metaclass - then, if you need a method to access it, it should be a class method on Command. (The metaclass is not intended to be part of the exposed API - in fact, it should probably be renamed with a '_' at the start of its name to make that clear.)

The hash method on Frame looks ok.

caiwan commented 8 years ago

I was attempting to access the list of available commands from outside; due I was experimenting with I'd use importlib or something similar rather than messing with metaclasses.