blob: f76f905928336a66c31d081c1ab8c38ea03140a8 (
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
|
#!/bin/sh
CHECK_SENSOR="/opt/sensor"
CHECK_ACCEL="/opt/sensor/accel"
CHECK_LIGHT="/opt/sensor/light"
CHECK_PROXI="/opt/sensor/proxi"
CHECK_GEO="/opt/sensor/geo"
CHECK_GYRO="/opt/sensor/gyro"
CHECK_NFC="/opt/nfc"
if [ ! -d $CHECK_SENSOR ]; then
mkdir /opt/sensor
if [ ! -d $CHECK_ACCEL ]; then
mkdir /opt/sensor/accel
fi
if [ ! -d $CHECK_LIGHT ]; then
mkdir /opt/sensor/light
fi
if [ ! -d $CHECK_PROXI ]; then
mkdir /opt/sensor/proxi
fi
if [ ! -d $CHECK_GEO ]; then
mkdir /opt/sensor/geo
fi
if [ ! -d $CHECK_GYRO ]; then
mkdir /opt/sensor/gyro
fi
touch /opt/sensor/accel/name
echo "accel_sim" > /opt/sensor/accel/name
touch /opt/sensor/accel/xyz
echo "0, -256, 0" > /opt/sensor/accel/xyz
touch /opt/sensor/light/name
echo "light_sim" > /opt/sensor/light/name
touch /opt/sensor/light/adc
echo "2000" > /opt/sensor/light/adc
touch /opt/sensor/light/level
echo "10" > /opt/sensor/light/level
touch /opt/sensor/proxi/name
echo "proxi_sim" > /opt/sensor/proxi/name
touch /opt/sensor/proxi/enable
echo "1" > /opt/sensor/proxi/enable
touch /opt/sensor/proxi/vo
echo "0" > /opt/sensor/proxi/vo
touch /opt/sensor/gyro/name
echo "gyro_sim" > /opt/sensor/gyro/name
touch /opt/sensor/gyro/gyro_x_raw
echo "0" > /opt/sensor/gyro/gyro_x_raw
touch /opt/sensor/gyro/gyro_y_raw
echo "0" > /opt/sensor/gyro/gyro_y_raw
touch /opt/sensor/gyro/gyro_z_raw
echo "0" > /opt/sensor/gyro/gyro_z_raw
touch /opt/sensor/geo/name
echo "geo_sim" > /opt/sensor/geo/name
touch /opt/sensor/geo/raw
echo "0 0 0 4" > /opt/sensor/geo/raw
touch /opt/sensor/geo/tesla
echo "1 0 -10" > /opt/sensor/geo/tesla
fi
if [ ! -d $CHECK_NFC ]; then
mkdir /opt/nfc
touch /opt/nfc/sdkMsg
fi
|