Skip to content

Commit

Permalink
fix python3 support for kalman constants
Browse files Browse the repository at this point in the history
  • Loading branch information
seandepagnier committed Jan 19, 2020
1 parent bcec94e commit 1331eaf
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Linux/python/PyRTIMU_Settings.cpp
Expand Up @@ -80,21 +80,6 @@ static PyMethodDef RTIMU_Settings_methods[] = {
NULL}
#endif

#if PY_MAJOR_VERSION >= 3
#define RTIMU_PARAM_FLOAT(name, member) \
{(char*)#name, \
(getter)([] (_object* self, void* closure) { \
return Py_BuildValue("d", ((RTIMU_Settings*)self)->val->member); \
}), \
(setter)([] (_object* self, PyObject *value, void *closure) { \
long d = PyLong_AsLong(value); \
if (PyErr_Occurred()) \
return -1; \
((RTIMU_Settings*)self)->val->member = d; \
return 0; \
}), \
NULL}
#else
#define RTIMU_PARAM_FLOAT(name, member) \
{(char*)#name, \
(getter)([] (_object* self, void* closure) { \
Expand All @@ -108,7 +93,6 @@ static PyMethodDef RTIMU_Settings_methods[] = {
return 0; \
}), \
NULL}
#endif

#define RTIMU_PARAM_VEC3(name, member) \
{(char*)#name, \
Expand Down

0 comments on commit 1331eaf

Please sign in to comment.