Skip to content

Commit

Permalink
fix for #297
Browse files Browse the repository at this point in the history
  • Loading branch information
fastbike authored and aentinger committed May 3, 2024
1 parent 3497024 commit af26f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/Arduino_CAN/src/CanUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ std::tuple<bool, uint32_t, uint32_t, uint32_t>
/* If the fractional part is sufficiently close to zero, we have
* found a valid prescaler configuration.
*/
if (brp_fract < 0.01)
if (brp_fract < 0.01 || brp_fract > 0.99)
{
uint32_t const baud_rate_prescaler = static_cast<uint32_t>(brp_ipart);
/* Assign TSEG1 and TSEG2 to set the sample point at 75%. */
Expand Down

0 comments on commit af26f8d

Please sign in to comment.