Commit 182d55f5 authored by Giuseppe Carboni's avatar Giuseppe Carboni
Browse files

Merge branch 'centos_7_compatibility' of https://github.com/discos/discos into...

Merge branch 'centos_7_compatibility' of https://github.com/discos/discos into active-surface-updates
parents 195c0713 fc2c1f1b
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,8 @@
    <MISTRAL>           <axis>ROTATION</axis> <coefficients>-51.821170  </coefficients></MISTRAL>
    <MISTRAL>           <axis>ROTATION</axis> <coefficients>-51.821170  </coefficients></MISTRAL>
    <MISTRAL_ASACTIVE>  <axis>ROTATION</axis> <coefficients>-51.821170  </coefficients></MISTRAL_ASACTIVE>
    <MISTRAL_ASACTIVE>  <axis>ROTATION</axis> <coefficients>-51.821170  </coefficients></MISTRAL_ASACTIVE>


    <CABINET>           <axis>ROTATION</axis> <coefficients>40          </coefficients></CABINET>

    <!-- BWG - GFR open - configurations commented out since the SETUP command takes care of positioning the GFR to 0 -->
    <!-- BWG - GFR open - configurations commented out since the SETUP command takes care of positioning the GFR to 0 -->
    <!--CCB>               <axis>ROTATION</axis> <coefficients>0           </coefficients></CCB-->
    <!--CCB>               <axis>ROTATION</axis> <coefficients>0           </coefficients></CCB-->
    <!--CCB_ASACTIVE>      <axis>ROTATION</axis> <coefficients>0           </coefficients></CCB_ASACTIVE-->
    <!--CCB_ASACTIVE>      <axis>ROTATION</axis> <coefficients>0           </coefficients></CCB_ASACTIVE-->
+6 −5
Original line number Original line Diff line number Diff line
@@ -79,11 +79,11 @@ namespace MinorServo
    using DiscosConfigurationNameTableType = std::map<std::string, std::pair<SRTMinorServoFocalConfiguration, bool>>;
    using DiscosConfigurationNameTableType = std::map<std::string, std::pair<SRTMinorServoFocalConfiguration, bool>>;
    const DiscosConfigurationNameTableType DiscosConfigurationNameTable =
    const DiscosConfigurationNameTableType DiscosConfigurationNameTable =
    {
    {
        {"LLP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        //{"LLP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        {"PPP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        //{"PPP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        {"PLP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        //{"PLP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        {"HHP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        //{"HHP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        {"XKP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        //{"XKP",     std::make_pair(CONFIGURATION_PRIMARY,    false)},
        {"CCG",     std::make_pair(CONFIGURATION_GREGORIAN1, true )},
        {"CCG",     std::make_pair(CONFIGURATION_GREGORIAN1, true )},
        {"KKG",     std::make_pair(CONFIGURATION_GREGORIAN2, true )},
        {"KKG",     std::make_pair(CONFIGURATION_GREGORIAN2, true )},
        {"WWG",     std::make_pair(CONFIGURATION_GREGORIAN3, true )},
        {"WWG",     std::make_pair(CONFIGURATION_GREGORIAN3, true )},
@@ -92,6 +92,7 @@ namespace MinorServo
        {"MISTRAL", std::make_pair(CONFIGURATION_GREGORIAN6, true )},
        {"MISTRAL", std::make_pair(CONFIGURATION_GREGORIAN6, true )},
        {"CCB",     std::make_pair(CONFIGURATION_BWG1,       true )},
        {"CCB",     std::make_pair(CONFIGURATION_BWG1,       true )},
        {"XB",      std::make_pair(CONFIGURATION_BWG3,       true )},
        {"XB",      std::make_pair(CONFIGURATION_BWG3,       true )},
        {"CABINET", std::make_pair(CONFIGURATION_GREGORIAN7, false)},
    };
    };


    /**
    /**
+1 −0
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@
      <xs:element name="CCB_ASACTIVE"       type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="CCB_ASACTIVE"       type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="XB"                 type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="XB"                 type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="XB_ASACTIVE"        type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="XB_ASACTIVE"        type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="CABINET"            type="SRTMinorServoCoefficientsType" minOccurs="0" maxOccurs="unbounded" />
     </xs:sequence>
     </xs:sequence>
    </xs:complexType>
    </xs:complexType>


+3 −2
Original line number Original line Diff line number Diff line
@@ -357,7 +357,8 @@ void SRTMinorServoBossCore::park()
    m_current_servos.clear();
    m_current_servos.clear();
    m_current_tracking_servos.clear();
    m_current_tracking_servos.clear();


    try
    // Skipping this because of the cover not always engaging the limit switch
    /*try
    {
    {
        // Send the STOW command to close the gregorian cover
        // Send the STOW command to close the gregorian cover
        if(!m_socket.sendCommand(SRTMinorServoCommandLibrary::stow("GREGORIAN_CAP", COVER_STATUS_CLOSED)).checkOutput())
        if(!m_socket.sendCommand(SRTMinorServoCommandLibrary::stow("GREGORIAN_CAP", COVER_STATUS_CLOSED)).checkOutput())
@@ -376,7 +377,7 @@ void SRTMinorServoBossCore::park()
        ex.setReason("Error while sending the STOW command to the gregorian cover.");
        ex.setReason("Error while sending the STOW command to the gregorian cover.");
        ex.log(LM_DEBUG);
        ex.log(LM_DEBUG);
        throw ex.getParkingErrorEx();
        throw ex.getParkingErrorEx();
    }
    }*/


    // Send the STOP command to all the servos
    // Send the STOP command to all the servos
    for(const auto& [servo_name, servo] : m_servos)
    for(const auto& [servo_name, servo] : m_servos)
+3 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,9 @@ void SRTMinorServoParkThread::runLoop()
        case 0:
        case 0:
        {
        {
            // First we check if the gregorian cover has closed
            // First we check if the gregorian cover has closed
            bool completed = m_core.m_status.getGregorianCoverPosition() == COVER_STATUS_CLOSED;
            // TEMPORARY: we skip the gregorian cover closing, therefore we don't check
            //bool completed = m_core.m_status.getGregorianCoverPosition() == COVER_STATUS_CLOSED;
            bool completed = true;


            // Then we cycle through all the servos and make sure their operative mode is STOP
            // Then we cycle through all the servos and make sure their operative mode is STOP
            if(completed && std::all_of(m_core.m_servos.begin(), m_core.m_servos.end(), [](const std::pair<std::string, SRTBaseMinorServo_ptr>& servo) -> bool
            if(completed && std::all_of(m_core.m_servos.begin(), m_core.m_servos.end(), [](const std::pair<std::string, SRTBaseMinorServo_ptr>& servo) -> bool