updated to correctly support matrix sensor 1007

in addition, sensor coordinate is based on portrai mode.