Skip to content

Commit af26f8d

Browse files
fastbikeaentinger
authored andcommitted
fix for #297
1 parent 3497024 commit af26f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/Arduino_CAN/src/CanUtil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ std::tuple<bool, uint32_t, uint32_t, uint32_t>
5353
/* If the fractional part is sufficiently close to zero, we have
5454
* found a valid prescaler configuration.
5555
*/
56-
if (brp_fract < 0.01)
56+
if (brp_fract < 0.01 || brp_fract > 0.99)
5757
{
5858
uint32_t const baud_rate_prescaler = static_cast<uint32_t>(brp_ipart);
5959
/* Assign TSEG1 and TSEG2 to set the sample point at 75%. */

0 commit comments

Comments
 (0)