change TPA settings to use uint8, fix float comparsion