You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generic Avtp_Can_SetField and the even more generic Avtp_SetField(Avtp_CanFieldDesc, AVTP_CAN_FIELD_MAX, (uint8_t*)pdu, field, value). exhibit the same behavior, but I would not overcomplicate those with "special" boolean handling (they would need to have special handling depending on field description), but only choose the highest level direct access convenience functions as in the example
The text was updated successfully, but these errors were encountered:
ACF-CAN offers convenience funtions to set fields, e.g.
Open1722/src/avtp/acf/Can.c
Lines 166 to 169 in 7fe06a3
This works fine for all fiedls with "int" semantics, but does not behave as expected for 1 bit fields with bool semantic.
In C you might do
where according to C sematics
cf->can_id & CAN_EFF_FLAG
evaluates to true for extended frame identifiers, however asCAN_EFF_FLAG
is defined asthe value is not set.
I would suggest to change the convenicence functions for 1 Bit Ids, e.g. to
The generic
Avtp_Can_SetField
and the even more genericAvtp_SetField(Avtp_CanFieldDesc, AVTP_CAN_FIELD_MAX, (uint8_t*)pdu, field, value)
. exhibit the same behavior, but I would not overcomplicate those with "special" boolean handling (they would need to have special handling depending on field description), but only choose the highest level direct access convenience functions as in the exampleThe text was updated successfully, but these errors were encountered: