Commit Graph

115 Commits

Author SHA1 Message Date
Beat Küng d8ab059ff3 cm8jl65: add comment which CRC is used 2019-01-15 09:19:52 +01:00
Claudio Micheli 8a313ffc26 Applied code-review suggestions.
- Removed blocking serial.
- Added passing variables by reference to parser.
- Removed commented code.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli d1da46ef46 Added generic UART configuration.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli ca0cd27c6b Formatted code.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 7124cbf3af Fixed CI broken build. Made TELEM2 default port.
Device port can be set via SENS_EN_CM8JL65 parameter:
SENS_EN_CM8JL65 = 0 -> Disabled
SENS_EN_CM8JL65 = 1 -> Enabled on TELEM2
SENS_EN_CM8JL65 = 2 -> Enabled on TELEM1

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli e4381bfc87 Added sensor enable/disable parameter (SENS_EN_CM8JL65).
Disabled by default.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 46c5a79b57 Renamed files according to distance sensor hardware.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli aee6a83fe0 Code Cleanup. Added configuration notes.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli c5fece6568 Redefined reading strategy from serial to get the latest available data.
First "stable" version of the driver.

TODO: - Cleanup the code
      - Bench test (compare data with IMU)
      - Flight Test

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 39ed84b5cd Debugging printf.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 5d70ac7fd9 Removed dismissed folder.
TODO : Adjust work_queue rescheduling (to always have a 10Hz cycle)

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli b0ac8fe963 Removed blocking "while" cycle to access serial port.
Serial is now cycled with work_queue rescheduling if some bytes are missing.

TODO: - Fix occasional sensor spikes (can be identified with crc)
      - Clean up the code
      - disable debug printf


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 93b3cf241b Renamed driver folder.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli dd300dca0a Solved frequency rate issue. Now driver publish at ~10Hz.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 4b7be38e67 Added uORB publishing.
TODO: Need to fix driver cycling.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 700fd5652d Added parsing function. Everything works OK.
TODO:
- Clean up the code
- Add uORB publishing messages

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 591e8fde5d Initial commit. Integrated new distance sensor hardware.
TODO: Parsing the data

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Julian Oes 5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
Daniel Agar f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
Daniel Agar 7caf9803ed delete unimplemented SENSORIOCRESET IOCTL 2018-11-06 07:43:43 +08:00
Daniel Agar d2ed091a1d delete IOCTL SENSOR_POLLRATE_MAX
- only SENSOR_POLLRATE_DEFAULT is needed
2018-11-06 07:43:43 +08:00
Daniel Agar 556a9422b5 delete IOCTL SENSOR_POLLRATE_MANUAL
- only used in self tests
2018-11-06 07:43:43 +08:00
Daniel Agar 8dfd55fc9e delete unused IOCTL SENSORIOCGPOLLRATE 2018-11-06 07:43:43 +08:00
Daniel Agar 9cd3e3d1cf distance sensors delete unused IOCTL SENSORIOCSQUEUEDEPTH 2018-11-06 07:43:43 +08:00
Daniel Agar f59f0d4b2d delete unused IOCTL SENSOR_POLLRATE_EXTERNAL 2018-11-06 07:43:43 +08:00
Mara Bos 10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Jake Dahl e6d78b89a2 ::write() returns number of bytes written, so I check for not zero as a pass 2018-10-17 12:42:35 -04:00
Jake Dahl cbae32a50a I missed a ::write, stupid jenkins 2018-10-17 12:42:35 -04:00
Jake Dahl edf82d3937 added return values that I check for ::read and ::write 2018-10-17 12:42:35 -04:00
Jake Dahl 39d0e0b80c changed px4_read/write to ::read/write 2018-10-17 12:42:35 -04:00
Jake Dahl 51ffee8137 removed px4_poll, something changed and broke the way I was using it. This has been tested successfully 2018-10-17 12:42:35 -04:00
Hamish Willee 8806389f24 Remove long command option from sf1xx driver docs 2018-10-17 10:34:33 +02:00
Hamish Willee 0e2aab46c9 Add module doc for sf1xx rangefinder 2018-10-17 10:34:33 +02:00
Daniele Pettenuzzo a2d1f6ddce ll40ls driver: support also lidar lite v3HP (#10578) 2018-10-04 00:54:27 -04:00
Beat Küng 0ac5f2cd8b ulanding radar: add UART config param 2018-09-28 10:29:31 +02:00
Beat Küng f0c0b6f6e8 params: remove unused SENS_EN_* params
Replaced with the more general serial config params.
2018-09-25 07:53:29 +02:00
Beat Küng babe300960 sf0x: avoid reopening the UART on startup
And:
- return correct return code in SF0X::init()
- remove unneeded SF0X::probe()
2018-09-25 07:53:29 +02:00
Beat Küng b5e552924a serial drivers/modules: add yaml config files 2018-09-25 07:53:29 +02:00
Beat Küng 91a1ac1b60 sf0x: add -d param to pass the serial port 2018-09-25 07:53:29 +02:00
Beat Küng d5bef4a932 sf0x.cpp: avoid using exit() 2018-08-31 18:11:58 +02:00
Daniel Agar 12dd9b475e tfmini add missing PX4_ERR argument 2018-08-30 19:04:13 +02:00
Jake Dahl 5a678295b3 added a check to ensure the initialize settings function succeeds. If it does not, the driver fails gracefully. This handles the case that the device is not there. 2018-08-28 18:52:23 -04:00
Jake Dahl 507a872546 Made changes as requested by the dev team. 2018-08-27 21:15:04 +02:00
Jake Dahl 07d606ef83 Added TI PGA460 driver functionality to PX4. 2018-08-27 21:15:04 +02:00
Daniel Agar fa9b968a16 ulanding cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar f2ef8708b2 tfmini cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 483bacad87 teraranger cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar cfe34ee19c srf02 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar ebcd3b0b2e sf1xx cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 8cb222494a sf0x cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00