Code:
function onKeyClick(bus, id, dlc, data)if data[1] == 0x80 thentxCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x40 thentxCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x20 thentxCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x10 thentxCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x08 thentxCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x06 thentxCan(1, 0x20A, 0, { 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x05 thentxCan(1, 0x20A, 0, { 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x04 thentxCan(1, 0x20A, 0, { 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x03 thentxCan(1, 0x20A, 0, { 0x9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x02 thentxCan(1, 0x20A, 0, { 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x01 thentxCan(1, 0x20A, 0, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })elseif data[1] == 0x00 thentxCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })endendfunction onTick()endtxCan(1, 0x000, 0, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })txCan(1, 0x20A, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })txCan(1, 0x30A, 0, { 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 })canRxAdd(0x18A, onKeyClick)
Statistics: Posted by opelpanfan — Thu Sep 07, 2023 4:02 pm
Statistics: Posted by opelpanfan — Thu Sep 07, 2023 2:27 pm
Statistics: Posted by opelpanfan — Wed Sep 06, 2023 6:06 pm
Statistics: Posted by opelpanfan — Tue Sep 05, 2023 7:51 am