vial/lock: flip around the lock/unlock logic
This commit is contained in:
parent
b0a3e0d0af
commit
377af7bcfc
@ -98,11 +98,11 @@ void vial_handle_cmd(uint8_t *msg, uint8_t length) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case vial_get_lock: {
|
||||
case vial_get_unlock_status: {
|
||||
/* Reset message to all FF's */
|
||||
memset(msg, 0xFF, length);
|
||||
/* First byte of message contains the status: whether board is unlocked */
|
||||
msg[0] = !vial_unlocked;
|
||||
msg[0] = vial_unlocked;
|
||||
msg[1] = 0;
|
||||
#ifndef VIAL_INSECURE
|
||||
/* Rest of the message are keys in the matrix that should be held to unlock the board */
|
||||
|
@ -36,7 +36,7 @@ enum {
|
||||
vial_get_def = 0x02,
|
||||
vial_get_encoder = 0x03,
|
||||
vial_set_encoder = 0x04,
|
||||
vial_get_lock = 0x05,
|
||||
vial_get_unlock_status = 0x05,
|
||||
vial_unlock_start = 0x06,
|
||||
vial_unlock_poll = 0x07,
|
||||
vial_lock = 0x08,
|
||||
|
Loading…
Reference in New Issue
Block a user