Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini committed Jul 16, 2018
2 parents 7cafc9a + f362894 commit 0671d5e
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/devices/opencv/OpenCVGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool OpenCVGrabber::open(Searchable & config) {
m_cap.set(CV_CAP_PROP_FRAME_HEIGHT, m_h);
}
} else {
m_w = (size_t)m_cap.get(CV_CAP_PROP_FRAME_HEIGHT);
m_h = (size_t)m_cap.get(CV_CAP_PROP_FRAME_HEIGHT);
}

// Ignore capture properties - they are unreliable
Expand Down
2 changes: 1 addition & 1 deletion src/devices/rpLidar/rpLidar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,10 @@ void RpLidar::run()

unsigned char minibuff[15];
unsigned int ok_count = 0;
bool new_scan = false;
do
{
buffer->select_elems(minibuff,15);
bool new_scan = false;

int start = (minibuff[0]) & 0x01;
int lock = (minibuff[0] >> 1) & 0x01;
Expand Down
2 changes: 1 addition & 1 deletion src/devices/transformServer/FrameTransformServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool Transforms_server_storage::delete_transform(int id)
return false;
}

bool Transforms_server_storage::set_transform(FrameTransform t)
bool Transforms_server_storage::set_transform(const FrameTransform& t)
{
LockGuard lock(m_mutex);
for (size_t i = 0; i < m_transforms.size(); i++)
Expand Down
2 changes: 1 addition & 1 deletion src/devices/transformServer/FrameTransformServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Transforms_server_storage
public:
Transforms_server_storage() {}
~Transforms_server_storage() {}
bool set_transform (yarp::math::FrameTransform t);
bool set_transform (const yarp::math::FrameTransform& t);
bool delete_transform (int id);
bool delete_transform (std::string t1, std::string t2);
inline size_t size() { return m_transforms.size(); }
Expand Down
2 changes: 1 addition & 1 deletion src/idls/rosmsg/src/RosType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ bool RosType::read(const char *tname, RosTypeSearch& env, RosTypeCodeGen& gen,
source = "";

RosType *cursor = this;
char buf[2048];
do {
char buf[2048];
result = fgets(buf,sizeof(buf),fin);
if (result==nullptr) break;
txt += "// ";
Expand Down
3 changes: 0 additions & 3 deletions src/idls/thrift/src/t_yarp_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ using namespace std;
class yfn {
public:
std::string name;
bool split;
int len;

yfn(const std::string& name) {
Expand All @@ -58,8 +57,6 @@ class yfn {
if (ct1>ct_max) ct_max = ct1;
}
}
//split = (ct_max<=4);
//len = split?ct:1;
len = ct;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/yarpbatterygui/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void MainWindow::updateMain()
return;
}

MainWindow::MainWindow(yarp::os::ResourceFinder rf, yarp::dev::IBattery* p_ibat, QWidget *parent) : QMainWindow(parent),
MainWindow::MainWindow(const yarp::os::ResourceFinder& rf, yarp::dev::IBattery* p_ibat, QWidget *parent) : QMainWindow(parent),
ibat(p_ibat),
drv(nullptr),
ui(new Ui::MainWindow),
Expand Down
2 changes: 1 addition & 1 deletion src/yarpbatterygui/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MainWindow :public QMainWindow
Q_OBJECT

public:
explicit MainWindow(yarp::os::ResourceFinder rf, yarp::dev::IBattery* ibat, QWidget *parent = 0);
explicit MainWindow(const yarp::os::ResourceFinder& rf, yarp::dev::IBattery* ibat, QWidget *parent = 0);
~MainWindow();

private slots:
Expand Down
2 changes: 1 addition & 1 deletion src/yarplogger/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void MainWindow::ctxMenu(const QPoint &pos)
menu->exec(ui->yarprunTreeView->mapToGlobal(pos));
}

MainWindow::MainWindow(yarp::os::ResourceFinder rf, QWidget *parent) :
MainWindow::MainWindow(const yarp::os::ResourceFinder& rf, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
Expand Down
2 changes: 1 addition & 1 deletion src/yarplogger/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MainWindow : public QMainWindow
Q_OBJECT

public:
explicit MainWindow(yarp::os::ResourceFinder rf, QWidget *parent = 0);
explicit MainWindow(const yarp::os::ResourceFinder& rf, QWidget *parent = 0);
~MainWindow();

private slots:
Expand Down
4 changes: 2 additions & 2 deletions src/yarpmanager/src-builder/arrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ GraphicModel* Arrow::getModel()
return &model;
}

void Arrow::setConnection(Connection conn)
void Arrow::setConnection(const Connection& conn)
{
connection = conn;
QString label = conn.carrier();
QString label = connection.carrier();
if(!label.isEmpty()){
textLbl.setText(label);
}
Expand Down
2 changes: 1 addition & 1 deletion src/yarpmanager/src-builder/arrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Arrow : public BuilderItem
int getId();
QString getFrom();
QString getTo();
void setConnection(Connection conn);
void setConnection(const Connection& conn);
void setConnectionSelected(bool selected);
void updateModel();
void updateCarrier(QString carrier);
Expand Down
9 changes: 7 additions & 2 deletions src/yarpmotorgui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ int main(int argc, char *argv[])
desc_driver_options.put("device", "robotDescriptionClient");
desc_driver_options.put("local", descLocalName);
desc_driver_options.put("remote", "/robotDescription");
desc_driver->open(desc_driver_options);
if (desc_driver && desc_driver->isValid())
if (desc_driver && desc_driver->open(desc_driver_options))
{
IRobotDescription* idesc = nullptr;
desc_driver->view(idesc);
Expand All @@ -158,6 +157,12 @@ int main(int argc, char *argv[])
}
}
}

if (desc_driver)
{
desc_driver->close();
delete desc_driver;
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/yarpmotorgui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ bool MainWindow::init(QStringList enabledParts,
int part_id = i_parts->second.partindex;
part = new PartItem(robot_name_without_slash.c_str(), part_id, part_name_without_slash.c_str(), finder, debug_param_enabled, speedview_param_enabled, enable_calib_all, scroll);

if(!part->getInterfaceError())
if(part && !part->getInterfaceError())
{
connect(part,SIGNAL(sequenceActivated()),this,SLOT(onSequenceActivated()));
connect(part,SIGNAL(sequenceStopped()),this,SLOT(onSequenceStopped()));
Expand Down
9 changes: 1 addition & 8 deletions src/yarpmotorgui/partitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1899,14 +1899,7 @@ void PartItem::onViewPositionTarget(bool ena)
for (int i = 0; i<m_layout->count(); i++)
{
JointItem *joint = (JointItem*)m_layout->itemAt(i)->widget();
if (ena)
{
joint->viewPositionTarget(ena);
}
else
{
joint->viewPositionTarget(ena);
}
joint->viewPositionTarget(ena);
}
}

Expand Down

0 comments on commit 0671d5e

Please sign in to comment.