diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index 2cf52e6..4e7fc9c 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -7,11 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: '3.x' - - uses: actions/checkout@v2 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: repository: adafruit/ci-arduino path: ci diff --git a/library.properties b/library.properties index 44af19f..368a984 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=CAN Adafruit Fork -version=1.2.0 +version=1.2.1 author=Sandeep Mistry maintainer=adafruit sentence=An Arduino library for sending and receiving data using CAN bus. diff --git a/src/CANSAME5x.cpp b/src/CANSAME5x.cpp index 30152b1..a4f03ca 100644 --- a/src/CANSAME5x.cpp +++ b/src/CANSAME5x.cpp @@ -456,6 +456,8 @@ int CANSAME5x::filter(int id, int mask) { state->extended_rx_filter[0].XIDFE_0.bit.EFEC = CAN_XIDFE_0_EFEC_REJECT_Val; state->extended_rx_filter[0].XIDFE_1.bit.EFID2 = 0; // mask state->extended_rx_filter[0].XIDFE_1.bit.EFT = CAN_XIDFE_1_EFT_CLASSIC_Val; + + return 1; } int CANSAME5x::filterExtended(long id, long mask) { @@ -465,11 +467,13 @@ int CANSAME5x::filterExtended(long id, long mask) { state->standard_rx_filter[0].SIDFE_0.bit.SFEC = CAN_SIDFE_0_SFEC_REJECT_Val; state->standard_rx_filter[0].SIDFE_0.bit.SFT = CAN_SIDFE_0_SFT_CLASSIC_Val; - // reject all extended messages + // accept matching extended messages state->extended_rx_filter[0].XIDFE_0.bit.EFID1 = id; state->extended_rx_filter[0].XIDFE_0.bit.EFEC = CAN_XIDFE_0_EFEC_STF0M_Val; state->extended_rx_filter[0].XIDFE_1.bit.EFID2 = mask; state->extended_rx_filter[0].XIDFE_1.bit.EFT = CAN_XIDFE_1_EFT_CLASSIC_Val; + + return 1; } int CANSAME5x::observe() {