Commit 1924974a authored by Marco Buttu's avatar Marco Buttu
Browse files

Bugfix: error notification in case can not move.

Trunk revision r1480
parent 66c8f922
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ struct ThreadParameters {
    CSecureArea< map<int, vector<PositionItem> > > *cmd_pos_list;
    CSecureArea< map<int, vector<PositionItem> > > *act_pos_list;
    map<int, bool> *status_thread_en;
    map<int, bool> *positioning_error;
    map<int, double> tracking_delta;
    map<int, bool> *stow_state;
    map<int, vector<double> > *park_positions;
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ private:
    MSBossConfiguration *m_configuration;
    Antenna::Mount_var m_antennaMount;
    bool m_ready_error;
    bool m_failure;
     
};

+3 −0
Original line number Diff line number Diff line
@@ -499,6 +499,9 @@ private:
     */
    static map<int, bool> m_stow_state;

    /** Flag to use for indicating a positioning error */
    static map<int, bool> m_positioning_error;

    /** Map of park positions vector **/
    static map<int, vector<double> > m_park_positions;

+9 −3
Original line number Diff line number Diff line
@@ -101,8 +101,14 @@ void MSBossPublisher::runLoop()
                            // if(status_bset.test(STATUS_WARNING) || (position == "park" && !component_ref->isParked()))
                            //     vstatus_bset.set(VS_WARNING);
                            // // If the minor servo is in failure and it is not parked 
                            // if(status_bset.test(STATUS_FAILURE) && position != "park")
                            //     vstatus_bset.set(VS_FAILURE);
                            if(status_bset.test(STATUS_FAILURE)) {
                                vstatus_bset.set(VS_FAILURE);
                            }
                        }

                        // If the tracking thread set the status as FAILURE
                        if(m_configuration->m_status == Management::MNG_FAILURE){
                            vstatus_bset.set(VS_FAILURE);
                        }
                    }
                }
@@ -128,7 +134,7 @@ void MSBossPublisher::runLoop()
        if(m_configuration->isStarting() || m_configuration->isParking() || vstatus_bset.test(VS_WARNING))
            ; // *m_configuration->status = Management::MNG_WARNING; // TODO: update the Boss status
        else if (vstatus_bset.test(VS_FAILURE))
            ; // *m_configuration->status = Management::MNG_FAILURE; // TODO: update the Boss status
            m_configuration->m_status = Management::MNG_FAILURE;
        else
            ; // *m_configuration->status = Management::MNG_OK; // TODO: update the Boss status

+9 −0
Original line number Diff line number Diff line
@@ -118,6 +118,15 @@ void SocketListener::runLoop() throw (ComponentErrors::SocketErrorExImpl)
                    return;
                }

                // If the answer is a NAK_setpos, alert for a failure
                if(startswith(rec_answer, "NAK_setpos")) {
                    (*m_params->positioning_error)[saddress] = true;
                }

                if(startswith(rec_answer, "setpos")) {
                    (*m_params->positioning_error)[saddress] = false;
                }


                // If the answer is the second setup turn the setup-bit off and delete the item from the map
                if(startswith(rec_answer, "setup")) {
Loading