Unverified Commit cde686e9 authored by Fabio Vitello's avatar Fabio Vitello Committed by GitHub
Browse files

Fix issue 613 (#705)



* #613 CDB changes from issue-588 branch

* Changed MedMinorServoConstants

MedMinorServoConstants is now a Singleton class

* update min/max values according to CDB

* Update MedMinorServoParameters.cpp

Fixed position_max

* Update NotoActiveSurfaceBoss.midl

Removed enums TASonewayaction and TASprofile

* Update NotoActiveSurfaceBoss.midl

* Updated MinorServoParameters schema and XML

* moving axis limits on CDB

* Read Limits from CDB Table MinorServoLimits

* Update MedMinorServoParameters.cpp

* Update MedMinorServoParameters.cpp

* Updated MinorServoLimits Table structure

* Update MedMinorServoParameters.cpp

* Rewrited values on xml file

* Update MedMinorServoGeometry.cpp

Catching MinorServoAxisLimitError on  positionToAxes

* Update MedMinorServoGeometry.cpp

* Update MedMinorServoGeometry.cpp

* Update MedMinorServoGeometry.cpp

* Fix #700, IRAPy now imports Connection class, not module (#701)

This will fix the PyCalmux component behavior

* Update MedMinorServoGeometry.cpp

* Fix for IRAPy Connection class (#703)

* Fix #700, IRAPy now imports Connection class, not module

This will fix the PyCalmux component behavior

* Fix #700, fixed a major issue in Connection class

* Fix #697, #698, read changelog

Issue #697: Noto active surface now uses common ASErrors instead of Noto ASErrors
The Noto ASErrors have been removed from the repository in order to avoid confusion

Issue #698: Noto active surface now links ActiveSurfaceCommon in the Makefile

* comment on CDB, populate axis name

* Removed old struct initialization

* Update MedMinorServoGeometry.cpp

Co-authored-by: default avatarAndrea Orlati <aorlati@users.noreply.github.com>
Co-authored-by: default avatarGiuseppe Carboni <giuseppecarboni89@live.com>
parent e24c0801
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -22,12 +22,13 @@ class Connection(object):

    def __init__(self, address, timeout=2):
        self.address = address
        self.timeout = timeout

    def __enter__(self):
        self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        connected = 1
        t0 = time.time()
        while time.time() - t0 < timeout:
        while time.time() - t0 < self.timeout:
            connected = self.s.connect_ex(self.address)
            if connected == 0:
                break
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ list of modules:
"""
import customlogging
import ACSLog
import Connection
from Connection import Connection

#Some comments required here. The custom logger mechanism is not working in python. 
#do the way to separate the system logs to the ones do be shown to the user is to use different
+16 −3
Original line number Diff line number Diff line
@@ -26,8 +26,21 @@
 		</xs:sequence>
 	</xs:complexType>
 		
	<xs:complexType name="TTableLimitsHeader">
 		<xs:sequence>
            <xs:element name="MINOR_SERVO_X" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="MINOR_SERVO_YP" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="MINOR_SERVO_Y" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="MINOR_SERVO_ZP" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="MINOR_SERVO_Z1" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="MINOR_SERVO_Z2" type="xs:string" minOccurs="0" maxOccurs="1" />
            <xs:element name="MINOR_SERVO_Z3" type="xs:string" minOccurs="0" maxOccurs="1" />
 		</xs:sequence>
 	</xs:complexType>

	<xs:complexType name="TTableMinorServo">
		<xs:sequence>
		 	<xs:element name="MinorServoLimits" type="TTableLimitsHeader" minOccurs="1" maxOccurs="1"/>
			<xs:element name="MinorServo" type="TTableHeader" minOccurs="1" maxOccurs="unbounded" />
 		</xs:sequence>
 	</xs:complexType>
+19 −7
Original line number Diff line number Diff line
@@ -13,12 +13,24 @@ struct MedMinorServoAxis_tag
    double speed_max;
} MedMinorServoAxis;

const MedMinorServoAxis MINOR_SERVO_X = { "X", -80, 80, 0.0, 0.05, 0.01, 14.0 };
const MedMinorServoAxis MINOR_SERVO_YP = { "YP", -5, 395, 0.0, 0.05, 0.01, 8.0 };
const MedMinorServoAxis MINOR_SERVO_Y = { "Y", -80, 80, 0.0, 0.05, 0.01, 14.0 };
const MedMinorServoAxis MINOR_SERVO_ZP = { "ZP", -5, 345, 0.0, 0.05, 0.01, 8.0 };
const MedMinorServoAxis MINOR_SERVO_Z1 = { "Z1", -125, 125, 0.0, 0.05, 0.01, 14.0 };
const MedMinorServoAxis MINOR_SERVO_Z2 = { "Z2", -125, 125, 0.0, 0.05, 0.01, 14.0 };
const MedMinorServoAxis MINOR_SERVO_Z3 = { "Z3", -125, 125, 0.0, 0.05, 0.01, 14.0 };
using namespace std;

class MedMinorServoConstants {
public:
    static MedMinorServoConstants *getInstance();
    MedMinorServoAxis MINOR_SERVO_X ;
    MedMinorServoAxis MINOR_SERVO_YP ;
    MedMinorServoAxis MINOR_SERVO_Y ;
    MedMinorServoAxis MINOR_SERVO_ZP ;
    MedMinorServoAxis MINOR_SERVO_Z1 ;
    MedMinorServoAxis MINOR_SERVO_Z2 ;
    MedMinorServoAxis MINOR_SERVO_Z3 ;

private:
    MedMinorServoConstants();
    static MedMinorServoConstants *instance;

};


#endif
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@ class MedMinorServoPosition
        double theta_y;
        MedMinorServoMode mode;
        ACS::Time time;
    
    private:
        MedMinorServoConstants *medMinorServoConstants;
};

/**
Loading