From 4810c860155f9fa40b8fe5076fdcfea4b463809f Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 8 Jan 2022 19:46:00 -0500 Subject: [PATCH] AlphaX --- firmware/config/engines/hyundai.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/config/engines/hyundai.cpp b/firmware/config/engines/hyundai.cpp index 42d103e970..5e9006a4a5 100644 --- a/firmware/config/engines/hyundai.cpp +++ b/firmware/config/engines/hyundai.cpp @@ -11,11 +11,12 @@ static void commonGenesisCoupe() { strncpy(config->luaScript, R"( +-- code outside of functions is invoked once on start-up -- listen to CAN ID 0x4f0 canRxAdd(0x4f0) -- todo: add payload logic -packet546 = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 } +packet4f1 = { 0xFA, 0x54, 0x00, 0x0, 0x00, 0x51, 0x00, 0x00 } function onCanRx(bus, id, dlc, data) id11 = id % 2048 @@ -28,13 +29,14 @@ function onCanRx(bus, id, dlc, data) if rpm > 800 then -- at the moment we simply - txCan(1, 0x546, 0, packet546) + txCan(1, 0x4f1, 0, packet4f1) end end function onTick() + -- empty function onTick we are not doing anything periodically so far end