Skip to content

Commit d09f8f1

Browse files
authored
hwp-bbb: Fix to IRIG timing bug (#940)
1 parent 32e3613 commit d09f8f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

socs/agents/hwp_encoder/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ def de_irig(val, base_shift=0):
9696
val : int
9797
raw IRIG bit info of each 100msec chunk
9898
base_shift : int, optional
99-
number of bit shifts. This should be 0 except for seccods
99+
number of bit shifts. This should be 0 except for seconds
100100
101101
Returns
102102
-------
103103
int
104-
Either of sec/min/hourds/day/year
104+
Either of sec/min/hours/day/year
105105
106106
"""
107107
return (((val >> (0 + base_shift)) & 1)
@@ -111,7 +111,7 @@ def de_irig(val, base_shift=0):
111111
+ ((val >> (5 + base_shift)) & 1) * 10
112112
+ ((val >> (6 + base_shift)) & 1) * 20
113113
+ ((val >> (7 + base_shift)) & 1) * 40
114-
+ ((val >> (8 + base_shift)) & 1) * 80)
114+
+ ((val >> (8 + base_shift)) & 1) * 80 * (base_shift == 0))
115115

116116

117117
def count2time(counts, t_offset=0.):

0 commit comments

Comments
 (0)