I commented sendKa() since I wanted "adaptive sync" to control the speed for sending keep alive packet.  

But I reversed that now, and let "adaptive sync" only send packet when period is less than KATIMEOUT. Since the period increase step by step, once it become greater than KATIMEOUT, "adaptive sync" will stop sending packet.