mirror of https://github.com/commaai/panda.git
safety param: assume uint16_t (#929)
This commit is contained in:
parent
d031d6e283
commit
cf8fb0b883
|
@ -40,8 +40,8 @@ AddrCheckStruct toyota_addr_checks[] = {
|
|||
addr_checks toyota_rx_checks = {toyota_addr_checks, TOYOTA_ADDR_CHECKS_LEN};
|
||||
|
||||
// safety param flags
|
||||
// first two bytes are for eps factor, last two are for flags
|
||||
const uint32_t TOYOTA_PARAM_OFFSET = 16U;
|
||||
// first byte is for eps factor, second is for flags
|
||||
const uint32_t TOYOTA_PARAM_OFFSET = 8U;
|
||||
const uint32_t TOYOTA_EPS_FACTOR = (1U << TOYOTA_PARAM_OFFSET) - 1U;
|
||||
const uint32_t TOYOTA_ALT_BRAKE = 1U << TOYOTA_PARAM_OFFSET;
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ class Panda(object):
|
|||
CLOCK_SOURCE_MODE_DISABLED = 0
|
||||
CLOCK_SOURCE_MODE_FREE_RUNNING = 1
|
||||
|
||||
FLAG_TOYOTA_ALT_BRAKE = (1 << 16)
|
||||
FLAG_TOYOTA_ALT_BRAKE = (1 << 8)
|
||||
|
||||
FLAG_HONDA_ALT_BRAKE = 1
|
||||
FLAG_HONDA_BOSCH_LONG = 2
|
||||
|
|
Loading…
Reference in New Issue