diff --git a/system/uorb/sensor/temp.c b/system/uorb/sensor/temp.c index 63545b312..4a2e2fb93 100644 --- a/system/uorb/sensor/temp.c +++ b/system/uorb/sensor/temp.c @@ -40,3 +40,4 @@ static const char sensor_temp_format[] = ****************************************************************************/ ORB_DEFINE(sensor_temp, struct sensor_temp, sensor_temp_format); +ORB_DEFINE(sensor_ambient_temp, struct sensor_temp, sensor_temp_format); diff --git a/system/uorb/sensor/temp.h b/system/uorb/sensor/temp.h index 2ee401af3..18067559e 100644 --- a/system/uorb/sensor/temp.h +++ b/system/uorb/sensor/temp.h @@ -36,5 +36,6 @@ /* register this as object request broker structure */ ORB_DECLARE(sensor_temp); +ORB_DECLARE(sensor_ambient_temp); #endif diff --git a/system/uorb/sensor/topics.c b/system/uorb/sensor/topics.c index 48619627f..2eec67dec 100644 --- a/system/uorb/sensor/topics.c +++ b/system/uorb/sensor/topics.c @@ -70,6 +70,7 @@ #include #include #include +#include #include @@ -81,6 +82,7 @@ static FAR const struct orb_metadata *g_sensor_list[] = { ORB_ID(sensor_accel), ORB_ID(sensor_accel_uncal), + ORB_ID(sensor_ambient_temp), ORB_ID(sensor_hinge_angle), ORB_ID(sensor_baro), ORB_ID(sensor_cap), @@ -139,6 +141,7 @@ static FAR const struct orb_metadata *g_sensor_list[] = ORB_ID(sensor_tilt_detector_uncal), ORB_ID(sensor_tvoc), ORB_ID(sensor_uv), + ORB_ID(sensor_velocity), ORB_ID(sensor_wake_gesture), ORB_ID(sensor_wake_gesture_uncal), ORB_ID(sensor_wrist_tilt), diff --git a/system/uorb/sensor/velocity.c b/system/uorb/sensor/velocity.c new file mode 100644 index 000000000..069717386 --- /dev/null +++ b/system/uorb/sensor/velocity.c @@ -0,0 +1,40 @@ +/**************************************************************************** + * apps/system/uorb/sensor/velocity.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +#ifdef CONFIG_UORB_FORMAT +static const char sensor_velocity_format[] = + "timestamp:%" PRIu64 ",velocity:%hf"; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_velocity, struct sensor_velocity, sensor_velocity_format); diff --git a/system/uorb/sensor/velocity.h b/system/uorb/sensor/velocity.h new file mode 100644 index 000000000..aff892c1f --- /dev/null +++ b/system/uorb/sensor/velocity.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/velocity.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __APPS_SYSTEM_UORB_SENSOR_VELOCITY_H +#define __APPS_SYSTEM_UORB_SENSOR_VELOCITY_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_velocity); + +#endif