Commit 643bab1c authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Merging latest bugfix onto master.

Reverting some AS features back to a stable condition
parents 666234a5 2054abb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
<?xml version='1.0' encoding='ISO-8859-1'?>
<SRTActiveSurfaceBoss xmlns="urn:schemas-cosylab-com:SRTActiveSurfaceBoss:1.0" xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" WatchingThreadTime="200000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" profile="1">
<SRTActiveSurfaceBoss xmlns="urn:schemas-cosylab-com:SRTActiveSurfaceBoss:1.0" xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" WatchingThreadTime="200000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" profile="4">
	<status />
	<enabled />
	<pprofile />
+39 −43
Original line number Diff line number Diff line
@@ -72,8 +72,44 @@ void SRTActiveSurfaceCore::run(void)
    ACS::pattern asProfile_val;


    while (monitor == true)
    {
    while (monitor == true) {

        bossStatus_var = tASBoss->status();
        bossStatus_val = bossStatus_var->get_sync(completion.out());
        switch (bossStatus_val) {
            case (Management::MNG_OK):
                ASstatusCode = 0;
                break;
            case (Management::MNG_WARNING):
                ASstatusCode = -1;
                break;
            case (Management::MNG_FAILURE):
                ASstatusCode = -2;
                break;
        }
        emit setGUIasStatusCode();

        asProfile_var = tASBoss->pprofile();
        asProfile_val = asProfile_var->get_sync(completion.out());
        switch (asProfile_val) {
            case (ActiveSurface::AS_SHAPED):
                asProfileCode = 0;
                break;
            case (ActiveSurface::AS_SHAPED_FIXED):
                asProfileCode = 1;
                break;
            case (ActiveSurface::AS_PARABOLIC):
                asProfileCode = 2;
                break;
            case (ActiveSurface::AS_PARABOLIC_FIXED):
                asProfileCode = 3;
                break;
            case (ActiveSurface::AS_PARK):
                asProfileCode = 4;
                break;
        }
        emit setGUIasProfileCode();

        if (totalactuators >= 1 && totalactuators <= 24) // 1 circle
            i= 1;
        if (totalactuators >= 25 && totalactuators <= 48)  // 2 circle
@@ -116,47 +152,6 @@ void SRTActiveSurfaceCore::run(void)
            totalactuators == 1105 || totalactuators == 1113 || totalactuators == 1117)      
            l = 1;

        //set the current USD color to yellow to identify which one is being checked
        theActuatorStatusColorString = "background-color: rgb(255, 255, 0);";
        emit setGUIActuatorColor(i, l, theActuatorStatusColorString);
		CIRATools::Wait(0,10000);

        bossStatus_var = tASBoss->status();
        bossStatus_val = bossStatus_var->get_sync(completion.out());
        switch (bossStatus_val) {
            case (Management::MNG_OK):
                ASstatusCode = 0;
                break;
            case (Management::MNG_WARNING):
                ASstatusCode = -1;
                break;
            case (Management::MNG_FAILURE):
                ASstatusCode = -2;
                break;
        }
        emit setGUIasStatusCode();

        asProfile_var = tASBoss->pprofile();
        asProfile_val = asProfile_var->get_sync(completion.out());
        switch (asProfile_val) {
            case (ActiveSurface::AS_SHAPED):
                asProfileCode = 0;
                break;
            case (ActiveSurface::AS_SHAPED_FIXED):
                asProfileCode = 1;
                break;
            case (ActiveSurface::AS_PARABOLIC):
                asProfileCode = 2;
                break;
            case (ActiveSurface::AS_PARABOLIC_FIXED):
                asProfileCode = 3;
                break;
            case (ActiveSurface::AS_PARK):
                asProfileCode = 4;
                break;
        }
        emit setGUIasProfileCode();

        try {
            tASBoss->usdStatus4GUIClient(i,l,status);
            if ((status & ENBL) == 0)  {// usd not enabled
@@ -221,6 +216,7 @@ void SRTActiveSurfaceCore::run(void)
		actuatorcounter = l;
		totacts = totalactuators;

		CIRATools::Wait(0,100000);
	} // end of while
}

+0 −10
Original line number Diff line number Diff line
@@ -185,16 +185,6 @@ module ActiveSurface
    	*/
    	oneway void top();
    	oneway void bottom();

        /**
        *   Get the last read status of the USD
        */
        long getStatus();

        /**
        *   Update the status of the USD
        */
        oneway void updateStatus();
	};

};
+0 −4
Original line number Diff line number Diff line
@@ -121,10 +121,6 @@ public:

    void sectorActiveSurface(int sector) throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::ComponentErrorsEx);

    void checkUSD(int sector, int lanIndex, int circleIndex, int usdCircleIndex, std::string serial_usd) throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::ComponentErrorsEx);

    void sectorSetupCompleted(int sector);

    void watchingActiveSurfaceStatus() throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::CouldntGetAttributeExImpl, ComponentErrors::ComponentNotActiveExImpl);

    void usdStatus4GUIClient(int circle, int actuator, CORBA::Long_out status) throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::CouldntGetAttributeExImpl, ComponentErrors::ComponentNotActiveExImpl);
+3 −6
Original line number Diff line number Diff line
@@ -49,21 +49,18 @@ public:
      * This method overrides the thread implementation class.
      * The thread can be exited by calling ACS::ThreadBase::stop or ACS::ThreadBase::exit command.
     */
     virtual void runLoop();
     virtual void run();

     /**
      * This method is used to set the sector to be initialized. It MUST be called before starting the thread execution
     */
     virtual void prepare(int sector);
     virtual void setSector(int sector);

private:

    IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core;
    CSRTActiveSurfaceBossCore *boss;
    int m_sector, m_index, m_usd_count;
    bool m_ready;
    std::vector<int> m_lanIndexes, m_circleIndexes, m_usdCircleIndexes;
    std::vector<std::string> m_serial_usds;
    int m_sector;
};

#endif /*_SRTACTIVESURFACEBOSSSECTORTHREAD_H_*/
Loading