File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -538,16 +538,19 @@ def _check_can_settings(
538
538
)
539
539
540
540
# check CAN operation mode
541
- if fd :
542
- settings_acceptable &= bool (
543
- bus_params_data .can_op_mode
544
- & xldefine .XL_CANFD_BusParams_CanOpMode .XL_BUS_PARAMS_CANOPMODE_CANFD
545
- )
546
- elif bus_params_data .can_op_mode != 0 : # can_op_mode is always 0 for cancaseXL
547
- settings_acceptable &= bool (
548
- bus_params_data .can_op_mode
549
- & xldefine .XL_CANFD_BusParams_CanOpMode .XL_BUS_PARAMS_CANOPMODE_CAN20
550
- )
541
+ # skip the check if can_op_mode is 0
542
+ # as it happens for cancaseXL, VN7600 and sometimes on other hardware (VN1640)
543
+ if bus_params_data .can_op_mode :
544
+ if fd :
545
+ settings_acceptable &= bool (
546
+ bus_params_data .can_op_mode
547
+ & xldefine .XL_CANFD_BusParams_CanOpMode .XL_BUS_PARAMS_CANOPMODE_CANFD
548
+ )
549
+ else :
550
+ settings_acceptable &= bool (
551
+ bus_params_data .can_op_mode
552
+ & xldefine .XL_CANFD_BusParams_CanOpMode .XL_BUS_PARAMS_CANOPMODE_CAN20
553
+ )
551
554
552
555
# check bitrates
553
556
if bitrate :
You can’t perform that action at this time.
0 commit comments