returns '<', '>' or null accoring to rotation or lack thereof

Property definitions

bcm2835 $ RotaryEncoder :: update
	# returns '<', '>' or null accoring to rotation or lack thereof
	fun update: nullable Char
	do
		var new_a = pin_a.lev
		var new_b = pin_b.lev
		var res = null

		if new_a != old_a or new_b != old_b then
			if not old_a and not old_b then
				# everything was on
				if not new_a and new_b then
					res = '<'
				else if new_a and not new_b then
					res = '>'
				end
			else if old_a and old_b then
				# everything was off
				if not new_a and new_b then
					res = '>'
				else if new_a and not new_b then
					res = '<'
				end
			end

			old_a = new_a
			old_b = new_b
		end

		return res
	end
lib/bcm2835/bcm2835.nit:132,2--161,4