Enabled in

This commit is contained in:
2021-07-07 12:04:36 +03:00
parent 88c6b06061
commit 534eeb992f
3 changed files with 15 additions and 26 deletions

View File

@@ -3,12 +3,12 @@ import can
import protocol_kx
import struct
import os
import time
can0 = can.interface.Bus(bustype='socketcan', channel='can0', bitrate=500000)
KXLOX = kx.KX(protocol_kx.KDescription.K_TEST_SOURCE_2_SIGLVL.value, 950, 255, can0)
KXLOX.send_test_source_enable(0)
KXLOX.KXInit(protocol_kx.KDescription.K_SBL_ID.value, 43)
KXLOX.KXInit(protocol_kx.KDescription.K_TEST_SOURCE_1_POS_X_MAX.value, 21)
KXLOX.KXInit(protocol_kx.KDescription.K_TEST_SOURCE_1_POS_Y_MAX.value, 21)
@@ -18,8 +18,5 @@ KXLOX.KXInit(protocol_kx.KDescription.K_TEST_SOURCE_1_POS_Y.value, 7)
KXLOX.KXInit(protocol_kx.KDescription.K_TEST_SOURCE_1_POS_X.value, 7)
KXLOX.KXInit(protocol_kx.KDescription.K_TEST_SOURCE_1_SIGLVL.value, 450)
KXLOX.KXInit(protocol_kx.KDescription.K_TEST_SOURCES_ENABLED.value, 1)
KXLOX.sendK()
KXLOX.writeToFlashK()
time.sleep(0.1)
KXLOX.reset()
KXLOX.send_test_source_enable(1)