Skip to content

Commit

Permalink
Merge pull request #3 from jrbenito/master
Browse files Browse the repository at this point in the history
Bugfix: PowerUp time was not properly set
  • Loading branch information
kanewallmann authored Oct 7, 2017
2 parents 3a40412 + 82988d9 commit a4e731f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions RTCC_MCP7940N.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,19 @@ bool RTCC_MCP7940N::HasPowerFailed(rtcc_time *dwTime, rtcc_time *upTime)
dwTime->mthone = time_data[3] & B1111;
dwTime->yrten = (year & B11110000) >> 4;
dwTime->yrone = year & B1111;
dwTime->secten = 0; //(time_data[0] & B1110000) >> 4;
dwTime->secone = 0; //time_data[0] & B1111;
dwTime->minten = (time_data[4] & B111000) >> 4;
dwTime->minone = time_data[4] & B1111;
dwTime->hrten = (time_data[5] & B110000) >> 4;
dwTime->hrone = time_data[5] & B1111;
dwTime->wkday = 0; //time_data[3] & B111; not provided
dwTime->dateten = (time_data[6] & B110000) >> 4;
dwTime->dateone = time_data[6] & B1111;
dwTime->mthten = (time_data[7] & B10000) >> 4;
dwTime->mthone = time_data[7] & B1111;
dwTime->yrten = (year & B11110000) >> 4;
dwTime->yrone = year & B1111;
upTime->secten = 0; //(time_data[0] & B1110000) >> 4;
upTime->secone = 0; //time_data[0] & B1111;
upTime->minten = (time_data[4] & B111000) >> 4;
upTime->minone = time_data[4] & B1111;
upTime->hrten = (time_data[5] & B110000) >> 4;
upTime->hrone = time_data[5] & B1111;
upTime->wkday = 0; //time_data[3] & B111; not provided
upTime->dateten = (time_data[6] & B110000) >> 4;
upTime->dateone = time_data[6] & B1111;
upTime->mthten = (time_data[7] & B10000) >> 4;
upTime->mthone = time_data[7] & B1111;
upTime->yrten = (year & B11110000) >> 4;
upTime->yrone = year & B1111;
}

return pwFail;
Expand Down

0 comments on commit a4e731f

Please sign in to comment.