Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 9205b02

Browse files
committed
Refactored into ModelConstants
1 parent bba4b6d commit 9205b02

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

selfdrive/modeld/constants.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
IDX_N = 33
21

32
def index_function(idx, max_val=192, max_idx=32):
43
return (max_val) * ((idx/max_idx)**2)
54

6-
7-
T_IDXS = [index_function(idx, max_val=10.0) for idx in range(IDX_N)]
5+
class ModelConstants:
6+
# time and distance indices
7+
IDX_N = 33
8+
T_IDXS = [index_function(idx, max_val=10.0) for idx in range(IDX_N)]

0 commit comments

Comments
 (0)