/// <summary> /// Direct servos control of the SVS board. /// </summary> /// /// <param name="servosBank">SVS's servo bank to control.</param> /// <param name="leftServo">Left servo setting, [0, 100].</param> /// <param name="rightServo">Right servo setting, [0, 100].</param> /// /// <remarks><para>The method performs servos control of the SVS board. /// For <see cref="ServosBank.Bank1"/> and <see cref="ServosBank.Bank3"/> /// banks it calls <see cref="SRV1.ControlServos"/> method for the corresponding /// SRV-1 Blackfin camera. In the case of <see cref="ServosBank.Bank0"/> or <see cref="ServosBank.Bank2"/>, /// the method sends 'Sab' SRV-1 command (see <a href="http://www.surveyor.com/SRV_protocol.html">SRV-1 /// Control Protocol</a>) to the appropriate SRV-1 Blackfin camera.</para> /// </remarks> /// /// <exception cref="NotConnectedException">Not connected to SVS. Connect to SVS board before using /// this method.</exception> /// public void ControlServos(ServosBank servosBank, int leftServo, int rightServo) { switch (servosBank) { case ServosBank.Bank0: // check limts if (leftServo > 100) { leftServo = 100; } if (rightServo > 100) { rightServo = 100; } SafeGetCommunicator1( ).Send(new byte[] { (byte)'S', (byte)leftServo, (byte)rightServo }); break; case ServosBank.Bank1: SafeGetCommunicator1( ).ControlServos(leftServo, rightServo); break; case ServosBank.Bank2: // check limts if (leftServo > 100) { leftServo = 100; } if (rightServo > 100) { rightServo = 100; } SafeGetCommunicator2( ).Send(new byte[] { (byte)'S', (byte)leftServo, (byte)rightServo }); break; case ServosBank.Bank3: SafeGetCommunicator2( ).ControlServos(leftServo, rightServo); break; } }
/// <summary> /// Direct servos control of the SVS board. /// </summary> /// /// <param name="servosBank">SVS's servo bank to control.</param> /// <param name="leftServo">Left servo setting, [0, 100].</param> /// <param name="rightServo">Right servo setting, [0, 100].</param> /// /// <remarks><para>The method performs servos control of the SVS board. /// For <see cref="ServosBank.Bank1"/> and <see cref="ServosBank.Bank3"/> /// banks it calls <see cref="SRV1.ControlServos"/> method for the corresponding /// SRV-1 Blackfin camera. In the case of <see cref="ServosBank.Bank0"/> or <see cref="ServosBank.Bank2"/>, /// the method sends 'Sab' SRV-1 command (see <a href="http://www.surveyor.com/SRV_protocol.html">SRV-1 /// Control Protocol</a>) to the appropriate SRV-1 Blackfin camera.</para> /// </remarks> /// /// <exception cref="NotConnectedException">Not connected to SVS. Connect to SVS board before using /// this method.</exception> /// public void ControlServos( ServosBank servosBank, int leftServo, int rightServo ) { switch ( servosBank ) { case ServosBank.Bank0: // check limts if ( leftServo > 100 ) leftServo = 100; if ( rightServo > 100 ) rightServo = 100; SafeGetCommunicator1( ).Send( new byte[] { (byte) 'S', (byte) leftServo, (byte) rightServo } ); break; case ServosBank.Bank1: SafeGetCommunicator1( ).ControlServos( leftServo, rightServo ); break; case ServosBank.Bank2: // check limts if ( leftServo > 100 ) leftServo = 100; if ( rightServo > 100 ) rightServo = 100; SafeGetCommunicator2( ).Send( new byte[] { (byte) 'S', (byte) leftServo, (byte) rightServo } ); break; case ServosBank.Bank3: SafeGetCommunicator2( ).ControlServos( leftServo, rightServo ); break; } }