Modules-old/Microstrain/Microstrain.cpp
////////////////////////////////////////////////////////////////////////////////
// Put the IMU into continuous mode
Put the IMU into continuous mode
Put the IMU into continuous mode
bool
Microstrain::setContinuous(cmd command)
{
  uint8_t cmd[4];
  uint8_t rep[8];
  cmd[0] = CMD_CONTINUOUS;
  cmd[1] = 0xC1; 
  cmd[2] = 0x29; 
  cmd[3] = command;
  transact(cmd, sizeof(cmd), rep, sizeof(rep), 1000);
  if (rep[1] != command) {
    return false;
  }
  continuous = true;
  return true;
}
bool Microstrain :: setContinuous ( cmd command ) { uint8_t cmd [ 4 ] ; uint8_t rep [ 8 ] ; cmd [ 0 ] = CMD_CONTINUOUS ; cmd [ 1 ] = 0xC1 ; cmd [ 2 ] = 0x29 ; cmd [ 3 ] = command ; transact ( cmd , sizeof ( cmd ) , rep , sizeof ( rep ) , 1000 ) ; if ( rep [ 1 ] != command ) { return false ; } continuous = true ; return true ; }
Put the IMU into continuous mode
Put the IMU into continuous mode
//Confirms user intent //Confirms user intent // Verify that continuous mode is set on correct command: