public void SetStatusFrameRateMs(StatusFrameRate stateFrameRate, int periodMs, uint timeoutMs = 0)
        {
            /* bounds check the period */
            if (periodMs < 1)
            {
                periodMs = 1;
            }
            else if (periodMs > 255)
            {
                periodMs = 255;
            }
            /* bounds frame */
            if ((int)stateFrameRate > 255)
            {
                return;
            }
            /* save the unsigned pieces */
            int period = (int)periodMs;
            int idx    = ((int)stateFrameRate & 0xFF);
            /* assemble */
            int paramValue = period;

            paramValue <<= 8;
            paramValue  |= idx;
            /* send the set request */
            ConfigSetParameter(ParamEnum.StatusFrameRate, paramValue, timeoutMs);
        }
Exemple #2
0
 public int SetStatusFrameRate(StatusFrameRate statusFrame, uint newPeriodMs, uint timeoutMs = 0)
 {
     return(_ll.SetStatusFrameRate((uint)statusFrame, newPeriodMs, timeoutMs));
 }
 /**
  * Select the feedback device to use in closed-loop
  */
 public void SetStatusFrameRateMs(StatusFrameRate stateFrame, uint periodMs)
 {
     int status = m_impl.SetStatusFrameRate((uint)stateFrame, periodMs);
     HandleStatus(status);
 }