//----------------------------------------------------------------------------------------// /** private wrapper to avoid specifying ordinal */ ErrorCode ConfigSetWrapper(ParamEnum paramEnum, TareType tareType, float angleDeg, int timeoutMs) { byte subValue = (byte)tareType; int ordinal = 0; return(base.ConfigSetParameter(paramEnum, angleDeg, subValue, ordinal, timeoutMs)); }
private int ConfigSetParameter(ParamEnum paramEnum, TareType tareType, float angleDeg, uint timeoutMs = 0) { const float deg_per_canunit = 0.015625f; Int32 deg_3B = ((Int32)(angleDeg / deg_per_canunit)); long paramValue; paramValue = (long)deg_3B & 0xFFFFFF; paramValue <<= 8; paramValue |= (byte)tareType; return(ConfigSetParameter(paramEnum, (float)paramValue)); }