Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Plugin-OPC-UA/PluginOPCUA.pro
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ INCLUDEPATH += ../robodk_interface
# ------------------------
# Flag to compile Open62541 source for any platform
win32-msvc {
DEFINES += _CRT_SECURE_NO_WARNINGS
QMAKE_CXXFLAGS_WARN_ON += -wd4100
QMAKE_CFLAGS_WARN_ON += -wd4100
QMAKE_CFLAGS += -std:clatest
Expand Down
5 changes: 0 additions & 5 deletions Plugin-OPC-UA/opcua_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
#include <QTimer>


#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS //disable fopen deprecation warning in msvs
#endif


//----------------------------
#include <QDebug>
#include <QString>
Expand Down
1 change: 1 addition & 0 deletions Plugin-OPC-UA/pluginopcua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <QDesktopServices>
#include <QSettings>
#include <QDateTime>
#include <QIODevice>


// only for Sleep()
Expand Down
14 changes: 7 additions & 7 deletions PluginAppLoader/apploader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QTimer>
#include <QSysInfo>
#include <QBuffer>
#include <QActionGroup>

// Function to check and sort priority of apps
struct CheckPriority {
Expand Down Expand Up @@ -779,8 +780,8 @@ void AppLoader::AppsSearch(bool install_requirements){
}

// Sort actions for the menu and the toolbar
qSort(menuActions.begin(), menuActions.end(), CheckPriority());
qSort(toolbarActions.begin(), toolbarActions.end(), CheckPriority());
std::sort(menuActions.begin(), menuActions.end(), CheckPriority());
std::sort(toolbarActions.begin(), toolbarActions.end(), CheckPriority());

// Add menu actions to the menu
for (int i=0; i<menuActions.length(); i++){
Expand All @@ -795,17 +796,17 @@ void AppLoader::AppsSearch(bool install_requirements){

// Sort all actions
if (ListActions.length() > 1){
qSort(ListActions.begin(), ListActions.end(), CheckPriority());
std::sort(ListActions.begin(), ListActions.end(), CheckPriority());
}

// Sort menus
if (ListMenus.length() > 1){
qSort(ListMenus.begin(), ListMenus.end(), CheckPriority());
std::sort(ListMenus.begin(), ListMenus.end(), CheckPriority());
}

// Sort toolbars
if (ListToolbars.length() > 1){
qSort(ListToolbars.begin(), ListToolbars.end(), CheckPriority());
std::sort(ListToolbars.begin(), ListToolbars.end(), CheckPriority());
}

// Append Apps directories to RoboDK's PYTHONPATH
Expand Down Expand Up @@ -1012,8 +1013,7 @@ void AppLoader::onRunScript(){
if (action->isCheckable()){
if (action->isChecked()){
// make sure we uncheck the action if the process ends or stops
connect(proc, static_cast<void(QProcess::*)(int)>(&QProcess::finished), proc, [action]() {

connect(proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), proc, [action]() {
QActionGroup *grp = action->actionGroup();
if (grp != nullptr && grp->checkedAction() == action){
emit grp->triggered(action); // important to reset the group lastaction static variable
Expand Down
6 changes: 4 additions & 2 deletions PluginAppLoader/installerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <QSettings>
#include <QComboBox>
#include <QDebug>
#include <QString>



InstallerDialog::InstallerDialog(AppLoader* apploader, QWidget* parent) :
Expand Down Expand Up @@ -83,7 +85,7 @@ bool InstallerDialog::processPackage(const QString& package){

QString name = unzipper.entryName();
int slash = name.indexOf('/');
if (slash < 0 || name.midRef(slash).compare(QString("/AppConfig.ini")) != 0)
if (slash < 0 || name.mid(slash).compare(QString("/AppConfig.ini")) != 0)
continue;

name.truncate(slash);
Expand Down Expand Up @@ -308,7 +310,7 @@ void InstallerDialog::on_buttonBox_accepted(){
if (!name.startsWith(entity.name + "/"))
continue;

QFileInfo fileInfo = folder.absoluteFilePath(name);
QFileInfo fileInfo(folder.absoluteFilePath(name));
folder.mkpath(fileInfo.absolutePath());
unzipper.entryExtract(fileInfo.absoluteFilePath());
}
Expand Down
3 changes: 2 additions & 1 deletion PluginBallbarTracker/PluginBallbarTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ void PluginBallbarTracker::update_ballbar_pose(){
double rho = 90.0 - qRadiansToDegrees(qAcos(pillar_2_tool_vec.z() / std::max(1e-6, r)));

// Theta θ
double theta = 180 - qRadiansToDegrees(qAcos(pillar_2_tool_vec.x() / std::max(1e-6, qSqrt(pillar_2_tool_vec.x() * pillar_2_tool_vec.x() + pillar_2_tool_vec.y() * pillar_2_tool_vec.y()))));
double xy_length = qSqrt(pillar_2_tool_vec.x() * pillar_2_tool_vec.x() + pillar_2_tool_vec.y() * pillar_2_tool_vec.y());
double theta = 180 - qRadiansToDegrees(qAcos(pillar_2_tool_vec.x() / std::max(1e-6, xy_length)));
if (pillar_2_tool_vec.y() > 0){
theta = -theta;
}
Expand Down
2 changes: 1 addition & 1 deletion PluginExample/pluginexample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void PluginExample::callback_information(){

// Perform some timing tests using the RoboDK API
RDK->ShowMessage("Starting timing tests", false);
QString text_message_html("<strong>Plugin Timing Tests Summary on " + QDateTime::currentDateTime().toString(Qt::SystemLocaleLongDate) + ":</strong><br>");
QString text_message_html("<strong>Plugin Timing Tests Summary on " + QDateTime::currentDateTime().toString() + ":</strong><br>");

int ntests=10000;
//Item robot = RDK->getItem("", IItem::ITEM_TYPE_ROBOT);
Expand Down
3 changes: 3 additions & 0 deletions PluginOpenGL-Shaders/PluginChip8Opengl.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ QT += opengl
QT += gui
QT += concurrent

greaterThan(QT_MAJOR_VERSION, 5) {
QT += openglwidgets
}


#-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Expand Down
Loading
Loading