class Clipsal::CBus

Included Modules

Defined in:

clipsal/c_bus.cr

Constant Summary

LEVEL_PERCENTAGE = 255 / 100
RAMP_RATES = {(...2000_u32) => 0_u8, (2000_u32...6000_u32) => 1_u8, (6000_u32...10000_u32) => 2_u8, (10000_u32...15000_u32) => 3_u8, (15000_u32...25000_u32) => 4_u8, (25000_u32...35000_u32) => 5_u8, (35000_u32...50000_u32) => 6_u8, (50000_u32...75000_u32) => 7_u8, (75000_u32...105000_u32) => 8_u8, (105000_u32...150000_u32) => 9_u8, (150000_u32...240000_u32) => 10_u8, (240000_u32...360000_u32) => 11_u8, (360000_u32...510000_u32) => 12_u8, (510000_u32...720000_u32) => 13_u8, (720000_u32...960000_u32) => 14_u8, (960000_u32...) => 15_u8}

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def connected #

[View source]
def disconnected #

[View source]
def lighting_level?(area : Area | Nil = nil) #

return the current level


[View source]
def lighting_scene?(area : Area | Nil = nil) #

[View source]
def lookup_ramp_rate(fade_time : UInt32) : UInt8 #

[View source]
def on_load #

[View source]
def on_update #

[View source]
def received(data, task) #

[View source]
def set_lighting_level(level : Float64, area : Area | Nil = nil, fade_time : UInt32 = 1000_u32) #
Description copied from module PlaceOS::Driver::Interface::Lighting::Level

level between 0.0 and 100.0, fade in milliseconds


[View source]
def set_lighting_scene(scene : UInt32, area : Area | Nil = nil, fade_time : UInt32 = 1000_u32) #

[View source]
def stop_fading(group : UInt8) #

[View source]