Skip to content

Commit

Permalink
current_safety_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Mar 31, 2020
1 parent 7908b72 commit 5325b62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion board/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
// **** 0xdf: set unsafe mode
case 0xdf:
// 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) {
if (current_safety_mode == SAFETY_SILENT ||
current_safety_mode == SAFETY_NOOUTPUT ||
current_safety_mode == SAFETY_ELM327) {
unsafe_mode = setup->b.wValue.w;
}
break;
Expand Down

0 comments on commit 5325b62

Please sign in to comment.