Skip to content

Commit

Permalink
Merge pull request #20 from pjlao307/dashcam-update
Browse files Browse the repository at this point in the history
Only show lock button when we're recording
  • Loading branch information
pjlao307 authored Oct 16, 2018
2 parents f96a1bf + 55982e3 commit 45d1a35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selfdrive/ui/dashcam.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ static void screen_draw_button(UIState *s, int touch_x, int touch_y) {
// Set button to bottom left of screen
if (s->vision_connected && s->plus_state == 0) {

draw_lock_button(s);
if (captureState == CAPTURE_STATE_CAPTURING) {
draw_lock_button(s);
}

int btn_w = 150;
int btn_h = 150;
Expand Down Expand Up @@ -260,6 +262,7 @@ static void screen_draw_button(UIState *s, int touch_x, int touch_y) {
void screen_toggle_record_state() {
if (captureState == CAPTURE_STATE_CAPTURING) {
stop_capture();
lock_current_video = false;
}
else {
//captureState = CAPTURE_STATE_CAPTURING;
Expand Down

0 comments on commit 45d1a35

Please sign in to comment.