Unverified Commit 9f228838 authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Merge pull request #706 from discos/master

Merging master onto stable for new release 1.0.6c
parents 16a0fc3e cde686e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -91,7 +91,7 @@ else
fi
fi


if ! hash vncviewer &>/dev/null; then
if ! hash vncviewer &>/dev/null; then
    echo -e "'vncviewer' is not installed, this script is setting up the connection but won't automatically start vnc.\nA custom client should be manually started."
    echo -e "'vncviewer' is not available, this script is setting up the connection but won't automatically start vnc.\nA custom vnc client will have to be manually started after the connection."
    vnc_avail="FALSE"
    vnc_avail="FALSE"
fi
fi


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


const MedMinorServoAxis MINOR_SERVO_X = { "X", -80, 80, 0.0, 0.05, 0.01, 14.0 };
using namespace std;
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 };
class MedMinorServoConstants {
const MedMinorServoAxis MINOR_SERVO_ZP = { "ZP", -5, 345, 0.0, 0.05, 0.01, 8.0 };
public:
const MedMinorServoAxis MINOR_SERVO_Z1 = { "Z1", -125, 125, 0.0, 0.05, 0.01, 14.0 };
    static MedMinorServoConstants *getInstance();
const MedMinorServoAxis MINOR_SERVO_Z2 = { "Z2", -125, 125, 0.0, 0.05, 0.01, 14.0 };
    MedMinorServoAxis MINOR_SERVO_X ;
const MedMinorServoAxis MINOR_SERVO_Z3 = { "Z3", -125, 125, 0.0, 0.05, 0.01, 14.0 };
    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
#endif
 No newline at end of file
+3 −0
Original line number Original line Diff line number Diff line
@@ -97,6 +97,9 @@ class MedMinorServoPosition
        double theta_y;
        double theta_y;
        MedMinorServoMode mode;
        MedMinorServoMode mode;
        ACS::Time time;
        ACS::Time time;
    
    private:
        MedMinorServoConstants *medMinorServoConstants;
};
};


/**
/**
+7 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@


#include "MedMinorServoGeometry.hpp"
#include "MedMinorServoGeometry.hpp"
#include "MedMinorServoOffset.hpp"
#include "MedMinorServoOffset.hpp"
#include "MedMinorServoConstants.hpp"


class VirtualAxis
class VirtualAxis
{
{
@@ -24,6 +25,8 @@ class VirtualAxis
                  double min,
                  double min,
                  double max);
                  double max);
        ~VirtualAxis();
        ~VirtualAxis();
        double get_min(){ return _min;};
        double get_max(){ return _max;};
        std::string get_name(){ return _name;};
        std::string get_name(){ return _name;};
        std::string get_unit(){ return _unit;};
        std::string get_unit(){ return _unit;};
        std::vector<double> get_coefficients(){ return _coefficients;};
        std::vector<double> get_coefficients(){ return _coefficients;};
@@ -42,6 +45,8 @@ class VirtualAxis
 */
 */
VirtualAxis parseAxisLine(const char* name, const char* line);
VirtualAxis parseAxisLine(const char* name, const char* line);


std::vector<double> parseLimitsLine(const char* line);

std::vector<std::string> split(const char* line, char delim = ',');
std::vector<std::string> split(const char* line, char delim = ',');


class MedMinorServoParameters
class MedMinorServoParameters
@@ -69,6 +74,7 @@ class MedMinorServoParameters
        std::string get_name(){ return _name;};
        std::string get_name(){ return _name;};
        bool can_track_elevation(){ return _can_track_elevation;};
        bool can_track_elevation(){ return _can_track_elevation;};
        bool is_primary_focus(){ return _primary_focus;};
        bool is_primary_focus(){ return _primary_focus;};
        std::vector<VirtualAxis> getAxesVector(){return _axes;};
        std::vector<std::string> getAxes(){return _axes_names;};
        std::vector<std::string> getAxes(){return _axes_names;};
        std::vector<std::string> getUnits(){return _axes_units;};
        std::vector<std::string> getUnits(){return _axes_units;};
        int getAxisMapping(std::string axis_name);
        int getAxisMapping(std::string axis_name);
@@ -78,6 +84,7 @@ class MedMinorServoParameters
        std::vector<VirtualAxis> _axes;
        std::vector<VirtualAxis> _axes;
        std::vector<std::string> _axes_names;
        std::vector<std::string> _axes_names;
        std::vector<std::string> _axes_units;
        std::vector<std::string> _axes_units;

};
};


typedef std::map<std::string, MedMinorServoParameters> MedMinorServoConfiguration;
typedef std::map<std::string, MedMinorServoParameters> MedMinorServoConfiguration;
Loading