aboutsummaryrefslogtreecommitdiff
path: root/android/WALT/app/src/main/res/layout/fragment_diagnostics.xml
blob: 82a3caeae803668c3a63a65ad119b0c36822ea33 (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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="org.chromium.latency.walt.DiagnosticsFragment">

    <!-- The whole list of options -->
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="3">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:orientation="vertical">

            <!-- Reconnect -->
            <LinearLayout
                style="@style/MenuItemStyle"
                android:onClick="onClickReconnect">

                <ImageView
                    style="@style/MenuIconStyle"
                    android:src="@drawable/ic_usb_black_24dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <TextView
                        style="@style/MenuTextTop"
                        android:text="Reconnect" />

                    <TextView
                        android:visibility="gone"
                        style="@style/MenuTextBottom"
                        android:text="TBD: Conn status" />


                </LinearLayout>
            </LinearLayout>
            <!-- End of Reconnect -->

            <View style="@style/MenuDivider" />

            <!-- Ping -->
            <LinearLayout
                style="@style/MenuItemStyle"
                android:onClick="onClickPing">

                <ImageView
                    style="@style/MenuIconStyle"
                    android:src="@drawable/ic_swap_horiz_black_24dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <TextView
                        style="@style/MenuTextTop"
                        android:text="Ping" />

                    <TextView
                        style="@style/MenuTextBottom"
                        android:text="Ping over USB with 1 byte" />


                </LinearLayout>
            </LinearLayout>
            <!-- End of Ping -->

            <View style="@style/MenuDivider" />

            <!-- ReSync -->
            <LinearLayout
                style="@style/MenuItemStyle"
                android:onClick="onClickSync">

                <ImageView
                    style="@style/MenuIconStyle"
                    android:src="@drawable/ic_schedule_black_24dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <TextView
                        style="@style/MenuTextTop"
                        android:text="Re-sync clocks" />

                </LinearLayout>
            </LinearLayout>
            <!-- End of ReSync -->

            <View style="@style/MenuDivider" />

            <!-- CheckDrift -->
            <LinearLayout
                style="@style/MenuItemStyle"
                android:onClick="onClickCheckDrift">

                <ImageView
                    style="@style/MenuIconStyle"
                    android:src="@drawable/ic_timelapse_black_24dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <TextView
                        style="@style/MenuTextTop"
                        android:text="Check clock drift" />

                    <TextView
                        style="@style/MenuTextBottom"
                        android:text="Check how much clocks diverged" />


                </LinearLayout>
            </LinearLayout>
            <!-- End of CheckDrift -->

            <View style="@style/MenuDivider" />

            <!-- Program -->
            <LinearLayout
                style="@style/MenuItemStyle"
                android:onClick="onClickProgram">

                <ImageView
                    style="@style/MenuIconStyle"
                    android:src="@drawable/ic_system_update_alt_black_24dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <TextView
                        style="@style/MenuTextTop"
                        android:text="Update WALT Firmware" />

                    <TextView
                        style="@style/MenuTextBottom"
                        android:text="Please press the button on the Teensy first" />


                </LinearLayout>
            </LinearLayout>
            <!-- Program -->

            <!--<View style="@style/MenuDivider" />-->

            <!-- Send T TODO: replace with send any char, it says nothing on the log, broadcast? -->
            <!--
            <LinearLayout
                style="@style/MenuItemStyle"
                android:onClick="onClickSendT">

                <ImageView
                    style="@style/MenuIconStyle"
                    android:src="@drawable/ic_swap_horiz_black_24dp" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <TextView
                        style="@style/MenuTextTop"
                        android:text="Send 'T'" />

                    <TextView
                        style="@style/MenuTextBottom"
                        android:text="..." />


                </LinearLayout>
            </LinearLayout>
            -->
            <!-- End of Send T -->
        </LinearLayout>
    </ScrollView>

    <TextView
        android:id="@+id/txt_log_diag"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="2"
        android:background="#BBBBBB"
        android:gravity="bottom"
        android:scrollbars="vertical" />

</LinearLayout>