Lorenz Meier
af28016a10
Merge pull request #2236 from TSC21/drivers_cleanup
...
drivers: added validity check
2015-06-26 07:39:09 +02:00
Mark Charlebois
1ca05aaa64
orb_advert_t changed to void * and checks changed to nullptr
...
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.
Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-05-27 14:42:49 -07:00
Mark Charlebois
a734fc96d1
extensive orb_advert_t fixes
...
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.
The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.
Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-05-27 14:41:33 -07:00
TSC21
ff1f3ba7f1
drivers: added validity check to sf0x
2015-05-26 18:08:55 +01:00
Ban Siesta
9f314dd191
drivers: corrected log string
2015-05-24 20:56:25 +01:00
Ban Siesta
69cbbd9b5e
distance_sensor: changed all distance sensors to orb_advertise_multi
2015-05-24 19:20:25 +01:00
Ban Siesta
0128fef8e0
drivers: more adaptations to changed message
2015-05-24 15:57:42 +01:00
Ban Siesta
103d59e9be
distance_sensor: adapted message to float for distance and adapted the drivers
2015-05-24 14:28:19 +01:00
Ban Siesta
a0011d2163
Merge remote-tracking branch 'px4/pr/2200' into lidarlite_merge
2015-05-24 13:59:18 +01:00
Ban Siesta
21dfd0243d
drivers: use new ringbuffer namespace everywhere
2015-05-24 10:04:38 +01:00
TSC21
98d0204087
distance_sensor: update drivers
2015-05-23 21:06:19 +01:00
TSC21
db48df15c8
Merge branch 'master'
2015-05-21 12:26:55 +01:00
Lorenz Meier
2903ceaacc
Merge branch 'release_v1.0.0'
2015-05-20 09:00:57 +02:00
James Goppert
e1d2c0c5ad
Move more messages to auto-generation, work on C++ code style
2015-05-20 08:57:29 +02:00
Mark Charlebois
9758112e31
Use px4_config.h instead of nuttx/config.h
...
Modified code to use OS independent header file for config settings.
Signed-off-by: Mark Charlebois <charlebm@gmail.com >
2015-04-20 10:55:41 -07:00
Simon Wilks
8fd6b3da21
Store the port so the in use port will be referenced when reopening.
2015-04-13 11:37:49 +02:00
Lorenz Meier
83c4da9635
SF0X: move to 0 based index
2015-02-09 22:56:23 +01:00
Lorenz Meier
407889ea2c
Merged master into indoor branch
2014-12-26 17:06:19 +01:00
Thomas Gubler
8fd9f98904
sf0x: write min and max to report
2014-12-14 12:10:28 +01:00
Thomas Gubler
8ebe463f16
sf0x: fix whitespace
2014-12-14 12:10:28 +01:00
Lorenz Meier
f3a224e30d
Merged master
2014-11-22 12:47:08 +01:00
Lorenz Meier
73e9137865
Fix unsigned comparison
2014-10-11 00:28:14 +02:00
Thomas Gubler
537991b83c
Revert "Remove range command"
...
This reverts commit c58d845339 .
2014-10-07 14:48:41 +02:00
Lorenz Meier
c58d845339
Remove range command
2014-10-07 14:27:09 +02:00
Lorenz Meier
760e72cc72
Remove unnecessary commands, unneeded output / resets
2014-10-07 14:25:07 +02:00
Lorenz Meier
4183444de6
Changed to proper parser for SF02/F laser rangefinder
2014-10-07 12:50:00 +02:00
Lorenz Meier
cc944da1a4
Merge branch 'master' of github.com:PX4/Firmware into indoor
2014-09-01 20:30:07 +02:00
Lorenz Meier
af3b3680e0
Fixed SF02/F driver, tested ok
2014-08-31 21:10:04 +02:00
Lorenz Meier
a46e1aa60e
Fix reschedule logic for SF02/F driver
2014-08-31 20:55:29 +02:00
Lorenz Meier
ee91320299
SF02/F driver: Improve parsing
2014-08-31 19:53:01 +02:00
Lorenz Meier
7a253d50f8
Add more paranoid checks to sf0x altitude parsing
2014-08-31 17:59:21 +02:00
Lorenz Meier
368afa1c1d
Start the laser on a port not offending the 2nd MAVLink instance
2014-08-27 09:47:31 +02:00
Lorenz Meier
16694051c9
Require a digit ahead of the dot for a valid number for the SF0x output
2014-08-18 13:16:58 +02:00
Don Gagne
92adbe9216
Fix compiler warnings
2014-06-29 17:47:24 -07:00
Lorenz Meier
aa312f96f8
drivers: Fix compile warnings and non-standard performance counter names
2014-05-21 14:20:48 +02:00
Lorenz Meier
be38372be1
sf0x driver: Stop emitting error messages once there is no hope this sensor will recover - continue to output error messages if the errors are just intermittent
2014-04-05 14:30:27 +02:00
Lorenz Meier
848c836431
Robustify SF02/F parsing, adjust health checks and startup routine to known initialization time of the sensor
2014-04-01 08:53:47 +02:00
Lorenz Meier
b7662537df
Fix code style of laser rangefinder
2014-03-11 10:54:48 +01:00
Lorenz Meier
7851472ae9
Laser range finder ready to roll, logging tested
2014-03-11 10:52:53 +01:00
Lorenz Meier
1c488a95da
Added laser range finder logging, needs testing
2014-03-10 18:46:22 +01:00
Lorenz Meier
d2905b8d8e
SF02/F operational, but not cleaned up / optimized - good enough for first logging
2014-03-09 11:18:02 +01:00
Lorenz Meier
d69d895f02
Add missing CDev init step
2014-03-09 00:46:13 +01:00
Lorenz Meier
171af566f7
Allow to set the UART via start argument, cleanups
2014-03-08 21:45:22 +01:00
Lorenz Meier
7cc33b9ca6
Complete output parsing, pending testing
2014-03-08 21:06:29 +01:00
Lorenz Meier
008efff42e
Added support for driver rangefinder
2014-03-08 20:00:06 +01:00