dotstar: report color data via get_status()
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
65afad9428
commit
7ced62ab9c
|
@ -82,6 +82,15 @@ class PrinterDotstar:
|
||||||
else:
|
else:
|
||||||
#Send update now (so as not to wake toolhead and reset idle_timeout)
|
#Send update now (so as not to wake toolhead and reset idle_timeout)
|
||||||
lookahead_bgfunc(None)
|
lookahead_bgfunc(None)
|
||||||
|
def get_status(self, eventtime):
|
||||||
|
cdata = []
|
||||||
|
for i in range(self.chain_count):
|
||||||
|
idx = (i + 1) * 4
|
||||||
|
cdata.append(
|
||||||
|
{k: round(v / 255., 4) for k, v in
|
||||||
|
zip("BGR", self.color_data[idx+1:idx+4])}
|
||||||
|
)
|
||||||
|
return {'color_data': cdata}
|
||||||
|
|
||||||
def load_config_prefix(config):
|
def load_config_prefix(config):
|
||||||
return PrinterDotstar(config)
|
return PrinterDotstar(config)
|
||||||
|
|
Loading…
Reference in New Issue