summaryrefstree
path: root/system/init.hosd.nanohub.rc
blob: 97d68d49ad94e3a65e327ee957866ffe6ced82d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
on late-ftm
    mkdir /data/vendor 0775 system system
    mkdir /data/vendor/sensor 0775 system system
    ## ensure correct calibration file permissions
    chown root system /persist/sensorcal.json
    chmod 0660 /persist/sensorcal.json

on late-ftm
    start nanohub-reset

service nanohub-reset /vendor/bin/nanoapp_cmd reset
    oneshot
    disabled
    user root
    group system


# For CSD calibration

service accel_cal_0 /nanotool -x cal -s accel
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.accel_cal=0
    start accel_cal_0

service gyro_cal_0 /nanotool -x cal -s gyro
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.gyro_cal=0
    start gyro_cal_0

service prox_cal_0 /nanotool -x cal -s prox=0
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.prox_cal=0
    start prox_cal_0

service prox_cal_1 /nanotool -x cal -s prox=1
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.prox_cal=1
    start prox_cal_1

service prox_cal_2 /nanotool -x cal -s prox=2
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.prox_cal=2
    start prox_cal_2

service prox_cal_3 /nanotool -x cal -s prox=3
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.prox_cal=3
    start prox_cal_3


service als_cal_0 /nanotool -x cal -s als=36686
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.als_cal=0
    start als_cal_0


service laser_cal_0 /laser_cali -o
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.laser_cal=0
    start laser_cal_0

service laser_cal_1 /laser_cali -c 700
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.laser_cal=1
    start laser_cal_1

service laser_cal_2 /laser_cali -m1 15
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.laser_cal=2
    start laser_cal_2

service laser_cal_3 /laser_cali -m7 15
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.laser_cal=3
    start laser_cal_3


service edge_cal_0 /nanotool -x cal -s edge=0
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=0
    start edge_cal_0

service edge_cal_1 /nanotool -x cal -s edge=1
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=1
    start edge_cal_1

service edge_cal_2 /nanotool -x cal -s edge=2
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=2
    start edge_cal_2

service edge_cal_3 /nanotool -x cal -s edge=3
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=3
    start edge_cal_3

service edge_cal_4 /nanotool -x cal -s edge=4
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=4
    start edge_cal_4

service edge_cal_5 /nanotool -x cal -s edge=5
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=5
    start edge_cal_5

service edge_cal_6 /nanotool -x cal -s edge=6
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=6
    start edge_cal_6

service edge_cal_7 /nanotool -x cal -s edge=7
    user root
    group root
    disabled
    seclabel u:object_r:nanoapp_cmd_exec:s0
    oneshot

on property:nanotool.edge_cal=7
    start edge_cal_7