lib/Seeed_Arduino_AS5600/AS5600.cpp
/*******************************************************
  Method: burnAngle
  In: none
  Out: 1 success
      -1 no magnet
      -2 burn limit exceeded
      -3 start and end positions not set (useless burn)
  Description: burns start and end positions to chip.
  THIS CAN ONLY BE DONE 3 TIMES
*******************************************************/
burnAngle
In: none
Out: 1 success
1 no magnet
2 burn limit exceeded
3 start and end positions not set (useless burn)
Description: burns start and end positions to chip.
THIS CAN ONLY BE DONE 3 TIMES
burnAngle In : none Out : 1 success 1 no magnet 2 burn limit exceeded 3 start and end positions not set ( useless burn ) Description : burns start and end positions to chip . THIS CAN ONLY BE DONE 3 TIMES
int AMS_5600::burnAngle()
{
  int retVal = 1;
  _zPosition = getStartPosition();
  _mPosition = getEndPosition();
  _maxAngle = getMaxAngle();
  if (detectMagnet() == 1)
  {
    if (getBurnCount() < 3)
    {
      if ((_zPosition == 0) && (_mPosition == 0))
        retVal = -3;
      else
        writeOneByte(_burn, 0x80);
    }
    else
      retVal = -2;
  }
  else
    retVal = -1;
  return retVal;
}
int AMS_5600 :: burnAngle ( ) { int retVal = 1 ; _zPosition = getStartPosition ( ) ; _mPosition = getEndPosition ( ) ; _maxAngle = getMaxAngle ( ) ; if ( detectMagnet ( ) == 1 ) { if ( getBurnCount ( ) < 3 ) { if ( ( _zPosition == 0 ) && ( _mPosition == 0 ) ) retVal = -3 ; else writeOneByte ( _burn , 0x80 ) ; } else retVal = -2 ; } else retVal = -1 ; return retVal ; }
Method: burnAngle
In: none
Out: 1 success
1 no magnet
2 burn limit exceeded
3 start and end positions not set (useless burn)
Description: burns start and end positions to chip.
Method : burnAngle In : none Out : 1 success 1 no magnet 2 burn limit exceeded 3 start and end positions not set ( useless burn ) Description : burns start and end positions to chip .