While working on a watch with the DS3231 the date was incorrect every other day.
On further inspection, the i2c_bcd_datetime module has a small error, in the get descriptor method has an operator precedence issue. the weekday value should be masked before adjusting for if the weekday starts on a 1 or a 0.
adding parens fixes the issue, tested on the ds3231.
While working on a watch with the DS3231 the date was incorrect every other day.
On further inspection, the i2c_bcd_datetime module has a small error, in the get descriptor method has an operator precedence issue. the weekday value should be masked before adjusting for if the weekday starts on a 1 or a 0.
adding parens fixes the issue, tested on the ds3231.