Skip to content

Commit 58ab1ac

Browse files
committed
Fixed isnan for windows and added DDS_ALIVE as an attribute
1 parent ec591ca commit 58ab1ac

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ endif()
259259

260260
add_subdirectory( plotjuggler_app )
261261

262-
if(PJ_ENABLE_MAC_APP)
262+
if(APPLE AND PJ_ENABLE_MAC_APP)
263263
# Copy plugins inside the .app folder.
264264
# Plugins have to be installed after the plotjuggler_app
265265
set(PJ_PLUGIN_INSTALL_DIRECTORY "${PJ_PLUGIN_INSTALL_DIRECTORY}/plotjuggler.app/Contents/MacOS")

plotjuggler_base/include/PlotJuggler/plotdatabase.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ enum PlotAttribute
5151

5252
// Color of the curve in the plot.
5353
// Type: QColor
54-
COLOR_HINT
54+
COLOR_HINT,
55+
56+
// DDS entity alive view
57+
// Type: boolean. Default: false
58+
DDS_ALIVE
5559
};
5660

5761
using Attributes = std::unordered_map<PlotAttribute, QVariant>;
@@ -64,6 +68,7 @@ inline bool CheckType(PlotAttribute attr, const QVariant& value)
6468
case COLOR_HINT:
6569
return value.type() == QVariant::Color;
6670
case ITALIC_FONTS:
71+
case DDS_ALIVE:
6772
return value.type() == QVariant::Bool;
6873
case TOOL_TIP:
6974
return value.type() == QVariant::String;

plotjuggler_plugins/ParserROS/rosx_introspection/include/rosx_introspection/details/conversion_impl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ template<typename SRC,typename DST,
235235
typename details::EnableIf< details::unsigned_to_smaller_conversion<SRC, DST>>* = nullptr >
236236
inline void convert_impl( const SRC& from, DST& target )
237237
{
238-
if(!std::isnan(from)) {
238+
if(!std::isnan(static_cast<double>(from))) {
239239
checkUpperLimit<SRC,DST>(from);
240240
}
241241
target = static_cast<DST>(from);
@@ -245,7 +245,7 @@ template<typename SRC,typename DST,
245245
typename details::EnableIf< details::signed_to_smaller_conversion<SRC, DST>>* = nullptr >
246246
inline void convert_impl( const SRC& from, DST& target )
247247
{
248-
if(!std::isnan(from)) {
248+
if(!std::isnan(static_cast<double>(from))) {
249249
checkLowerLimit<SRC,DST>(from);
250250
checkUpperLimit<SRC,DST>(from);
251251
}
@@ -257,7 +257,7 @@ template<typename SRC,typename DST,
257257
typename details::EnableIf< details::signed_to_smaller_unsigned_conversion<SRC, DST>>* = nullptr >
258258
inline void convert_impl( const SRC& from, DST& target )
259259
{
260-
if (!std::isnan(from) && from < 0 ){
260+
if (!std::isnan(static_cast<double>(from)) && from < 0 ){
261261
throw RangeException("Value is negative and can't be converted to signed");
262262
}
263263

@@ -332,7 +332,7 @@ template<typename SRC,typename DST,
332332
typename details::EnableIf< details::integer_to_floating_conversion<SRC, DST>>* = nullptr >
333333
inline void convert_impl( const SRC& from, DST& target )
334334
{
335-
if(!std::isnan(from)) {
335+
if(!std::isnan(static_cast<double>(from))) {
336336
checkTruncation<SRC,DST>(from);
337337
}
338338
target = static_cast<DST>( from);

0 commit comments

Comments
 (0)