Commits

Trammell Hudson  committed b31c025

Wait an extra timeout period at the end of the symbol

  • Participants
  • Parent commits e65fbed

Comments (0)

Files changed (1)

 	uint8_t port = 0xFF;
 
 	led_on();
+	//busy_wait(on_ticks/4); // ignore any pulses in the first half?
+	//port &= busy_wait(3*on_ticks/4);
 	port &= busy_wait(on_ticks);
 
 	led_off();
 			const uint8_t port = wait(dit_time, dit_time);
 			if (is_dah(port))
 				goto start_dah_bit;
-			//if (is_dit(port))
-				//goto start_dit_bit;
 
 			continue;
 		} else
 			const uint8_t port = wait(3*dit_time, dit_time);
 			if (is_dit(port))
 				goto start_dit_bit;
-			//if (is_dah(port))
-				//goto start_dah_bit;
 
 			continue;
 		} else
 		if (bits == 0)
 		{
+
 #if 0
 			if (last_send_time && now() > last_send_time)
 				usb_keyboard_press(KEY_SPACE, 0);
 		// Neither key is held down and the single space time
 		// has elapsed (since wait_delay is blocking).
 
+		// \todo Delay one more cycle to be sure
+		const uint8_t port = busy_wait(dit_time);
+		if (is_dah(port))
+			goto start_dah_bit;
+		if (is_dit(port))
+			goto start_dit_bit;
+
 		// Timeout has passed; check to see if the
 		// value exist in the map
 		uint8_t c = pgm_read_byte(&morse[value]);