diff --git a/system/uorb/sensor/charge.c b/system/uorb/sensor/charge.c new file mode 100644 index 00000000000..3dfa7623b8d --- /dev/null +++ b/system/uorb/sensor/charge.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/charge.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_charge_format[] = + "timestamp:%" PRIu64 ",charge:%" PRId64 ""; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_charge, struct sensor_charge, + sensor_charge_format); diff --git a/system/uorb/sensor/charge.h b/system/uorb/sensor/charge.h new file mode 100644 index 00000000000..ab5121d2108 --- /dev/null +++ b/system/uorb/sensor/charge.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/charge.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_CHARGE_H +#define __APPS_SYSTEM_UORB_SENSOR_CHARGE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_charge); + +#endif diff --git a/system/uorb/sensor/conductivity.c b/system/uorb/sensor/conductivity.c new file mode 100644 index 00000000000..483e5271cd6 --- /dev/null +++ b/system/uorb/sensor/conductivity.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/conductivity.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_conductivity_format[] = + "timestamp:%" PRIu64 ",conductivity:%hf"; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_conductivity, struct sensor_conductivity, + sensor_conductivity_format); diff --git a/system/uorb/sensor/conductivity.h b/system/uorb/sensor/conductivity.h new file mode 100644 index 00000000000..0026a80789c --- /dev/null +++ b/system/uorb/sensor/conductivity.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/conductivity.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_CONDUCTIVITY_H +#define __APPS_SYSTEM_UORB_SENSOR_CONDUCTIVITY_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_conductivity); + +#endif diff --git a/system/uorb/sensor/current.c b/system/uorb/sensor/current.c new file mode 100644 index 00000000000..0043f35518a --- /dev/null +++ b/system/uorb/sensor/current.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/current.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_current_format[] = + "timestamp:%" PRIu64 ",current:%hf"; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_current, struct sensor_current, + sensor_current_format); diff --git a/system/uorb/sensor/current.h b/system/uorb/sensor/current.h new file mode 100644 index 00000000000..054e4a73fc3 --- /dev/null +++ b/system/uorb/sensor/current.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/current.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_CURRENT_H +#define __APPS_SYSTEM_UORB_SENSOR_CURRENT_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_current); + +#endif diff --git a/system/uorb/sensor/energy.c b/system/uorb/sensor/energy.c new file mode 100644 index 00000000000..d88e51e6ed2 --- /dev/null +++ b/system/uorb/sensor/energy.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/energy.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_energy_format[] = + "timestamp:%" PRIu64 ",energy:%" PRId64 ""; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_energy, struct sensor_energy, + sensor_energy_format); diff --git a/system/uorb/sensor/energy.h b/system/uorb/sensor/energy.h new file mode 100644 index 00000000000..7aabf4b0dea --- /dev/null +++ b/system/uorb/sensor/energy.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/energy.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_ENERGY_H +#define __APPS_SYSTEM_UORB_SENSOR_ENERGY_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_energy); + +#endif diff --git a/system/uorb/sensor/power.c b/system/uorb/sensor/power.c new file mode 100644 index 00000000000..02295697dfc --- /dev/null +++ b/system/uorb/sensor/power.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/power.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_power_format[] = + "timestamp:%" PRIu64 ",power:%hf"; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_power, struct sensor_power, + sensor_power_format); diff --git a/system/uorb/sensor/power.h b/system/uorb/sensor/power.h new file mode 100644 index 00000000000..38490ec8f92 --- /dev/null +++ b/system/uorb/sensor/power.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/power.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_POWER_H +#define __APPS_SYSTEM_UORB_SENSOR_POWER_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_power); + +#endif diff --git a/system/uorb/sensor/resistance.c b/system/uorb/sensor/resistance.c new file mode 100644 index 00000000000..54636f7ad9c --- /dev/null +++ b/system/uorb/sensor/resistance.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/resistance.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_resistance_format[] = + "timestamp:%" PRIu64 ",resistance:%hf"; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_resistance, struct sensor_resistance, + sensor_resistance_format); diff --git a/system/uorb/sensor/resistance.h b/system/uorb/sensor/resistance.h new file mode 100644 index 00000000000..ca384010d66 --- /dev/null +++ b/system/uorb/sensor/resistance.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/resistance.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_RESISTANCE_H +#define __APPS_SYSTEM_UORB_SENSOR_RESISTANCE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_resistance); + +#endif diff --git a/system/uorb/sensor/temp.c b/system/uorb/sensor/temp.c index 63545b3126a..4a2e2fb93b6 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 2ee401af3b6..18067559e29 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 48619627f42..e1941233c41 100644 --- a/system/uorb/sensor/topics.c +++ b/system/uorb/sensor/topics.c @@ -35,9 +35,13 @@ #include #include #include +#include #include +#include +#include #include #include +#include #include #include #include @@ -61,15 +65,19 @@ #include #include #include +#include #include #include #include +#include #include #include #include #include #include #include +#include +#include #include @@ -81,13 +89,18 @@ 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), + ORB_ID(sensor_charge), ORB_ID(sensor_co2), + ORB_ID(sensor_conductivity), + ORB_ID(sensor_current), ORB_ID(sensor_device_orientation), ORB_ID(sensor_dust), ORB_ID(sensor_ecg), + ORB_ID(sensor_energy), ORB_ID(sensor_eng), ORB_ID(sensor_force), ORB_ID(sensor_gas), @@ -126,9 +139,11 @@ static FAR const struct orb_metadata *g_sensor_list[] = ORB_ID(sensor_pm1p0), ORB_ID(sensor_pm25), ORB_ID(sensor_pose_6dof), + ORB_ID(sensor_power), ORB_ID(sensor_ppgd), ORB_ID(sensor_ppgq), ORB_ID(sensor_prox), + ORB_ID(sensor_resistance), ORB_ID(sensor_rgb), ORB_ID(sensor_rotation), ORB_ID(sensor_significant_motion), @@ -139,6 +154,8 @@ 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_voltage), ORB_ID(sensor_wake_gesture), ORB_ID(sensor_wake_gesture_uncal), ORB_ID(sensor_wrist_tilt), @@ -164,6 +181,7 @@ FAR const struct orb_metadata *orb_get_meta(FAR const char *name) for (i = 0; g_sensor_list[i]; i++) { size_t len = strlen(g_sensor_list[i]->o_name); + if ((!strncmp(g_sensor_list[i]->o_name, name, len)) && (name[len] == '\0' || isdigit(name[len]))) { diff --git a/system/uorb/sensor/velocity.c b/system/uorb/sensor/velocity.c new file mode 100644 index 00000000000..0697173867c --- /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 00000000000..aff892c1fd9 --- /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 diff --git a/system/uorb/sensor/voltage.c b/system/uorb/sensor/voltage.c new file mode 100644 index 00000000000..a76fafc110f --- /dev/null +++ b/system/uorb/sensor/voltage.c @@ -0,0 +1,41 @@ +/**************************************************************************** + * apps/system/uorb/sensor/voltage.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_voltage_format[] = + "timestamp:%" PRIu64 ",voltage:%hf"; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +ORB_DEFINE(sensor_voltage, struct sensor_voltage, + sensor_voltage_format); diff --git a/system/uorb/sensor/voltage.h b/system/uorb/sensor/voltage.h new file mode 100644 index 00000000000..c75c760c556 --- /dev/null +++ b/system/uorb/sensor/voltage.h @@ -0,0 +1,38 @@ +/**************************************************************************** + * apps/system/uorb/sensor/voltage.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_VOLTAGE_H +#define __APPS_SYSTEM_UORB_SENSOR_VOLTAGE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* register this as object request broker structure */ + +ORB_DECLARE(sensor_voltage); + +#endif