add spacing
This commit is contained in:
parent
a76564f488
commit
b6d077c226
@ -155,20 +155,37 @@ int ctap_user_verification(uint8_t arg)
|
||||
// Return 1 for user is present, 0 user not present
|
||||
int ctap_user_presence_test()
|
||||
{
|
||||
#ifdef SKIP_BUTTON_CHECK
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
|
||||
uint32_t t1 = millis();
|
||||
RGB(0x304010);
|
||||
|
||||
#ifdef USE_BUTTON_DELAY
|
||||
delay(3000);
|
||||
RGB(0x001040);
|
||||
delay(50);
|
||||
return 1;
|
||||
#endif
|
||||
while (IS_BUTTON_PRESSED())
|
||||
{
|
||||
if (t1 + 5000 < millis())
|
||||
{
|
||||
printf1(TAG_GEN,"Button not pressed\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
t1 = millis();
|
||||
|
||||
do
|
||||
{
|
||||
if (t1 + 5000 < millis())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (! IS_BUTTON_PRESSED())
|
||||
continue;
|
||||
delay(1);
|
||||
@ -227,6 +244,12 @@ void heartbeat()
|
||||
int but = IS_BUTTON_PRESSED();
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
RGB(0x70fefe); // bright ass light
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (state)
|
||||
{
|
||||
val--;
|
||||
@ -236,13 +259,14 @@ void heartbeat()
|
||||
val++;
|
||||
}
|
||||
|
||||
if (val > 30 || val < 1)
|
||||
if (val >120/3 || val < 1)
|
||||
{
|
||||
state = !state;
|
||||
}
|
||||
|
||||
if (but) RGB(val * 2);
|
||||
else RGB(val << 8);
|
||||
else RGB(val*3 | ((val*3) << 8) | (val << 16) );
|
||||
// else RGB((val*3) << 8);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@ void u2f_request(struct u2f_request_apdu* req, CTAP_RESPONSE * resp)
|
||||
rcode = U2F_SW_CLASS_NOT_SUPPORTED;
|
||||
goto end;
|
||||
}
|
||||
#if defined(BRIDGE_TO_WALLET)
|
||||
#if defined(BRIDGE_TO_WALLET) || defined(IS_BOOTLOADER)
|
||||
struct u2f_authenticate_request * auth = (struct u2f_authenticate_request *) req->payload;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user