diff src/comm.asm @ 69:50697bd41c54

+CHANGE: Some French Translations +CHANGE: Default Future TTS=0 (Disabled) +NEW: Expand "gas change window" up to 1m below programmed + change depth (If ppO2 within user-set max. threshold) +BUGFIX: Intermittent USB connection on MAC
author heinrichsweikamp
date Sun, 02 Feb 2014 20:19:53 +0100
parents 00636132cca6
children 0fc8113ddf6d
line wrap: on
line diff
--- a/src/comm.asm	Sat Feb 01 15:31:30 2014 +0100
+++ b/src/comm.asm	Sun Feb 02 20:19:53 2014 +0100
@@ -100,7 +100,8 @@
 	call	rs232_get_byte
 
     btfss   vusb_in                     ; USB plugged in?
-    bra     comm_service_exit_nousb     ; Disconnected -> Exit
+    bra     comm_service_exit_nousb_delay   ; Disconnected -> Exit
+comm_mode4a:
 
 	btfsc	switch_right				; Abort with right
 	bra		comm_service_exit
@@ -150,6 +151,13 @@
     bsf     comm_service_enabled
 	bra		comm_download_mode0		; Startbyte for download mode found
 
+
+comm_service_exit_nousb_delay:
+    WAITMS  d'200'
+    btfss   vusb_in                     ; USB plugged in?
+    bra     comm_service_exit_nousb     ; Disconnected -> Exit
+    bra     comm_mode4a                 ; (Still) connected, return
+
 comm_service_exit_nousb:                ; Disconnected -> Exit
 	WIN_SMALL	comm_status3_column, comm_status3_row
 	STRCPY_TEXT_PRINT	tUsbClosed      ; Port closed