Text this: Unified Switching between Active Flying and Perching of a Bioinspired Robot Using Impedance Control