mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 03:23:54 +01:00
fix year encoding in the dcf77
This commit is contained in:
2
.vscode/.server-controller-port.log
vendored
2
.vscode/.server-controller-port.log
vendored
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"port": 13452,
|
||||
"time": 1743768242698,
|
||||
"time": 1743882066314,
|
||||
"version": "0.0.3"
|
||||
}
|
||||
@@ -182,8 +182,8 @@ void calculate_dcf77_bits(time_t now, int *bits) {
|
||||
|
||||
int year = t->tm_year % 100;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
bits[50 + i] = (month % year >> i) & 1;
|
||||
}
|
||||
bits[50 + i] = (year % 10 >> i) & 1;
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
bits[54 + i] = (year / 10 >> i) & 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user