changed the test implementation functionality from H1 to manual override button, added 2 indicator lights for the override button, and added them to the docu + functional description
This commit is contained in:
parent
11d4208ec7
commit
5bbba294f7
@ -33,7 +33,7 @@ public class ManualDriveActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
setContentView(R.layout.activity_manual_drive);
|
setContentView(R.layout.activity_manual_drive);
|
||||||
|
|
||||||
ToggleButton button = (ToggleButton) findViewById(R.id.h1_control_button);
|
ToggleButton button = (ToggleButton) findViewById(R.id.manual_override_button);
|
||||||
button.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
button.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
@ -68,8 +68,8 @@ public class ManualDriveActivity extends AppCompatActivity {
|
|||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
boolean supposedToBeValue = intent.getBooleanExtra("coil", false);
|
boolean supposedToBeValue = intent.getBooleanExtra("coil", false);
|
||||||
|
|
||||||
ImageView lightOn = (ImageView) findViewById(R.id.h1_status_light_on);
|
ImageView lightOn = (ImageView) findViewById(R.id.manual_override_status_light_on);
|
||||||
ImageView lightOff = (ImageView) findViewById(R.id.h1_status_light_off);
|
ImageView lightOff = (ImageView) findViewById(R.id.manual_override_status_light_on);
|
||||||
|
|
||||||
if (supposedToBeValue) {
|
if (supposedToBeValue) {
|
||||||
lightOn.setVisibility(View.VISIBLE);
|
lightOn.setVisibility(View.VISIBLE);
|
||||||
|
@ -430,4 +430,27 @@
|
|||||||
app:layout_constraintEnd_toEndOf="@+id/m2_control_button"
|
app:layout_constraintEnd_toEndOf="@+id/m2_control_button"
|
||||||
app:layout_constraintHorizontal_bias="0.476"
|
app:layout_constraintHorizontal_bias="0.476"
|
||||||
app:layout_constraintStart_toStartOf="@+id/m2_control_button" />
|
app:layout_constraintStart_toStartOf="@+id/m2_control_button" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/manual_override_status_light_on"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/manual_override_button"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/manual_override_button"
|
||||||
|
app:srcCompat="@android:drawable/presence_online" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/manual_override_status_light_off"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/manual_override_button"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/manual_override_button"
|
||||||
|
app:srcCompat="@android:drawable/presence_invisible" />
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user