diff --git a/libuavcan/dsdl_compiler/data_type_template.hpp b/libuavcan/dsdl_compiler/data_type_template.hpp index 0719c11424..c393b8eb17 100644 --- a/libuavcan/dsdl_compiler/data_type_template.hpp +++ b/libuavcan/dsdl_compiler/data_type_template.hpp @@ -8,7 +8,6 @@ #pragma once -#include #include #include #include diff --git a/pyuavcan/pyuavcan/dsdl/parser.py b/pyuavcan/pyuavcan/dsdl/parser.py index a446d1af02..2b085038a4 100644 --- a/pyuavcan/pyuavcan/dsdl/parser.py +++ b/pyuavcan/pyuavcan/dsdl/parser.py @@ -4,7 +4,7 @@ # Copyright (C) 2014 Pavel Kirienko # -import os, re, logging, math +import os, re, logging from io import StringIO from .signature import compute_signature from .common import DsdlException, pretty_filename @@ -60,10 +60,9 @@ class PrimitiveType(Type): return cast_mode + ' ' + primary_type def validate_value_range(self, value): - if math.isfinite(value): - low, high = self.value_range - if not low <= value <= high: - error('Value [%s] is out of range %s', value, self.value_range) + low, high = self.value_range + if not low <= value <= high: + error('Value [%s] is out of range %s', value, self.value_range) def get_max_bitlen(self): return self.bitlen