rendered paste body// Issac : Only for Auto Balanceunsigned char Measure_PositionN(unsigned char NM){ unsigned char Result; Result = Measure_PositionV(NM); if (ERROR_SUCCEED != Result) return Result; Result = Measure_PositionH(NM); if (ERROR_SUCCEED != Result) return Result; RTDRead(VER_START_80, 4, Y_INC); // Translate byte order : RTD little indian -> 8051 big indian Data[6] = Data[1] & 0x0f; Data[7] = Data[0]; Data[8] = Data[3] & 0x0f; Data[9] = Data[2]; usVer_Start = ((unsigned int *)Data)[3]; usVer_End = ((unsigned int *)Data)[4]; RTDRead(HOR_START_84, 4, Y_INC); // Translate byte order : RTD little indian -> 8051 big indian Data[4] = Data[3] & 0x0f; Data[5] = Data[2]; Data[2] = Data[1] & 0x0f; Data[3] = Data[0]; usH_Start = ((unsigned int *)Data)[1]; usH_End = ((unsigned int *)Data)[2]; return ERROR_SUCCEED;}