Changeset 254 in flair-src for trunk/lib


Ignore:
Timestamp:
Jul 16, 2018, 3:36:47 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

change watchdog timeout with gcs
remove unnecessary messages on bldc

Location:
trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/FrameworkManager.h

    r213 r254  
    7777  * \param rcv_buf_size receive buffer size
    7878  */
    79   void SetupConnection(std::string address, uint16_t port,Time watchdogTimeout=(Time)1000000000,
     79  void SetupConnection(std::string address, uint16_t port,Time watchdogTimeout=(Time)1500000000,
    8080                       size_t rcv_buf_size = 10000);
    8181
  • trunk/lib/FlairCore/src/FrameworkManager_impl.cpp

    r243 r254  
    139139}
    140140
    141 void FrameworkManager_impl::ConnectionLost(void) {
     141void FrameworkManager_impl::SetConnectionLost(void) {
    142142  Err("connection lost\n");
    143143  if(gcs_watchdog!=NULL) gcs_watchdog->SafeStop();
     
    241241  // watchdog for connection with ground station
    242242  connection_lost = false;
    243   gcs_watchdog = new Watchdog(this, std::bind(&FrameworkManager_impl::ConnectionLost, this),watchdogTimeout);
     243  gcs_watchdog = new Watchdog(this, std::bind(&FrameworkManager_impl::SetConnectionLost, this),watchdogTimeout);
    244244  gcs_watchdog->Start();
    245245}
  • trunk/lib/FlairCore/src/unexported/FrameworkManager_impl.h

    r234 r254  
    125125  std::vector<std::string> xml_changes;
    126126  flair::core::Watchdog *gcs_watchdog;
    127   void ConnectionLost(void);
     127  void SetConnectionLost(void);
    128128};
    129129
  • trunk/lib/FlairSensorActuator/src/Bldc_impl.cpp

    r214 r254  
    123123  input->GetMutex();
    124124  for (int i = 0; i < motors_count; i++) {
    125     if (input->ValueNoMutex(i, 0) != 0)
    126       is_motor_running = true;
    127125    if (are_enabled) {
    128126      // Printf("%i %f %f\n",i,input->ValueNoMutex(i,0),power[i]);
     
    132130      values[i] = 0;
    133131    }
     132    if(values[i] != 0) is_motor_running = true;
    134133  }
    135134  input->ReleaseMutex();
Note: See TracChangeset for help on using the changeset viewer.