Skip to content

Commit

Permalink
update updating unsafe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Mar 31, 2020
1 parent 98503e8 commit 7908b72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion board/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
break;
// **** 0xdf: set unsafe mode
case 0xdf:
unsafe_mode = setup->b.wValue.w;
// you can only set this if you are in a non car safety mode
if (safety_mode == SAFETY_SILENT || safety_mode == SAFETY_NOOUTPUT || safety_mode == SAFETY_ELM327) {
unsafe_mode = setup->b.wValue.w;
}
break;
// **** 0xe0: uart read
case 0xe0:
Expand Down

0 comments on commit 7908b72

Please sign in to comment.