@@ -201,7 +201,7 @@ static char receiveByte;
201201static bool messagereceived ;
202202static int cmd ;
203203static int received ;
204-
204+ static bool initialized ;
205205static uint8_t rxBuffer [258 ];
206206static uint8_t payLoadBuffer [256 ];
207207static uint8_t rxbyte ;
@@ -342,7 +342,11 @@ static void setTransmit()
342342 gpio_mode_set_output (input_pin , GPIO_OUTPUT_PUSH_PULL );
343343
344344 // delay a bit to let the sender get setup for receiving
345- delayMicroseconds (BITTIME );
345+ // only delay if device info has been sent, this prevents
346+ // an issue with iNAV
347+ if (initialized ){
348+ delayMicroseconds (BITTIME );
349+ }
346350}
347351
348352static void serialwriteOneChar (uint8_t c )
@@ -373,6 +377,7 @@ static void send_BAD_CRC_ACK()
373377static void sendDeviceInfo ()
374378{
375379 sendString (devinfo .deviceInfo ,sizeof (devinfo .deviceInfo ));
380+ initialized = true;
376381}
377382
378383static bool checkAddressWritable (uint32_t address )
@@ -947,6 +952,7 @@ int main(void)
947952{
948953 bl_clock_config ();
949954 bl_timer_init ();
955+ delayMicroseconds (50000 );
950956 bl_gpio_init ();
951957
952958#ifdef BOOTLOADER_TEST_CLOCK
@@ -961,7 +967,7 @@ int main(void)
961967
962968 checkForSignal ();
963969
964- gpio_mode_set_input (input_pin , GPIO_PULL_NONE );
970+ gpio_mode_set_input (input_pin , GPIO_PULL_UP );
965971
966972#ifdef USE_ADC_INPUT // go right to application
967973 jump ();
0 commit comments