src/AS5600.cpp
word AMS_5600::setEndPosition(word endAngle)
{
  word _rawEndAngle;
  if (endAngle == -1)
    _rawEndAngle = getRawAngle();
  else
    _rawEndAngle = endAngle;

  writeOneByte(_addr_mpos, highByte(_rawEndAngle));
  delay(2);
  writeOneByte(_addr_mpos+1, lowByte(_rawEndAngle));
  delay(2);
  word _mPosition = readTwoBytesSeparately(_addr_mpos);

  return (_mPosition);
}
/*******************************************************
  Method: setEndtPosition
  In: new end angle position
  Out: value of end position register
  Description: sets a value in end position register.
  If no value is provided, method will read position of
  magnet.  
*******************************************************/
setEndtPosition
In: new end angle position
Out: value of end position register
Description: sets a value in end position register.
If no value is provided, method will read position of
magnet.
setEndtPosition In : new end angle position Out : value of end position register Description : sets a value in end position register . If no value is provided method will read position of magnet .
word AMS_5600::setEndPosition(word endAngle)
{
  word _rawEndAngle;
  if (endAngle == -1)
    _rawEndAngle = getRawAngle();
  else
    _rawEndAngle = endAngle;
  writeOneByte(_addr_mpos, highByte(_rawEndAngle));
  delay(2);
  writeOneByte(_addr_mpos+1, lowByte(_rawEndAngle));
  delay(2);
  word _mPosition = readTwoBytesSeparately(_addr_mpos);
  return (_mPosition);
}
word AMS_5600 :: setEndPosition ( word endAngle ) { word _rawEndAngle ; if ( endAngle == -1 ) _rawEndAngle = getRawAngle ( ) ; else _rawEndAngle = endAngle ; writeOneByte ( _addr_mpos , highByte ( _rawEndAngle ) ) ; delay ( 2 ) ; writeOneByte ( _addr_mpos + 1 , lowByte ( _rawEndAngle ) ) ; delay ( 2 ) ; word _mPosition = readTwoBytesSeparately ( _addr_mpos ) ; return ( _mPosition ) ; }
Method: setEndtPosition
In: new end angle position
Out: value of end position register
Description: sets a value in end position register.
Method : setEndtPosition In : new end angle position Out : value of end position register Description : sets a value in end position register .