Skip to content

Commit

Permalink
Fix RTC year argument for #176
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jul 7, 2021
1 parent e277bf1 commit b4c0d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions micropython/modules/breakout_rtc/breakout_rtc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ mp_obj_t BreakoutRTC_set_time(size_t n_args, const mp_obj_t *pos_args, mp_map_t
mp_raise_ValueError("date out of range. Expected 1 to 31");
else if(month < 1 || month > 12)
mp_raise_ValueError("month out of range. Expected 1 to 12");
else if(year < 0 || year > 99)
mp_raise_ValueError("year out of range. Expected 0 to 99");
else if(year < 2000 || year > 2099)
mp_raise_ValueError("year out of range. Expected 2000 to 2099");
else
return mp_obj_new_bool(self->breakout->set_time(sec, min, hour, weekday, date, month, year));

Expand Down

0 comments on commit b4c0d78

Please sign in to comment.