Skip to content

Commit 2f72e35

Browse files
committed
Increase startup delay
This prevents the main µC from occasionally receiving garbage data from the USB µC on startup.
1 parent bc8fdc9 commit 2f72e35

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/automation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ bool init_automation(void)
4747
sent_data.r_stick = S_NEUTRAL;
4848
sent_data.magic_and_leds = MAGIC_VALUE;
4949

50-
/* Wait 2 ms for initial ready signal */
51-
_delay_ms(2);
50+
/* Wait 12 ms for initial ready signal */
51+
_delay_ms(12);
5252
if (bit_is_set(UCSR0A, RXC0)) {
5353
/* Retrieve ready signal byte */
5454
uint8_t received = UDR0;

src/usb-iface/usb-iface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int main(void)
6060
Serial_Init(BAUD, ENABLE_DOUBLESPEED);
6161

6262
/* Send the initial sync byte to the main µC */
63-
_delay_ms(1);
63+
_delay_ms(11);
6464
Serial_SendByte(INIT_SYNC_CHAR);
6565

6666
/* Initialize LUFI */

0 commit comments

Comments
 (0)