15 Commits

Author SHA1 Message Date
Niklas Hauser
af40d5befd nsh: check nsh_consolemain return value
Starting a new console allocates memory dynamically, which can fail.
2023-08-29 10:55:01 -04:00
Patrick José Pereira
837847f3ad mavlink: Use snprintf over sprintf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2023-05-22 07:46:54 +02:00
Julian Oes
bb591c6c29 mavlink_shell: fix stall on CubeOrange
On CubeOrange where no console is configured by default, starting
MAVLink shell just stalls, and doesn't work.

Also, logfile download has been reported not to work, and again, seems
to work with this change.

Signed-off-by: Julian Oes <julian@oes.ch>
2022-12-23 11:00:20 -05:00
Ville Juven
59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Bruce Meagher
714234ca90
posix: add mavlink shell for posix targets (#19800) 2022-06-20 11:51:47 +02:00
Daniel Agar
6359c8c008
mavlink: shell expand locking (#19308)
- on some H7 boards (cuav x7pro tested) there's an occasional hard fault when starting the mavlink shell that is no longer reproducible with the slightly expanded locking
 - this is likely just changing the timing (holding the sched lock for longer), but this should be harmless for now until we can identify the root cause
2022-04-25 11:53:22 -04:00
Lorenz Meier
a5151f92ea
Merge pull request #17065 from PX4/pr/fix-mavlink-shell
MAVLink shell: Ensure that nothing is written to the file handles during shell creation.
2021-03-15 09:47:58 +01:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
02d4405a62 c++11 default destructors 2018-06-30 19:55:08 -04:00
Daniel Agar
4e32cb17df clang-tidy modernize-use-equals-default 2018-05-18 22:48:55 +02:00
Daniel Agar
bf84cf0dcf Cygwin: use relative paths where needed 2018-01-05 14:47:33 -05:00
Matthias Grob
70de169f15 Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment
Most of the incompatitbilities are luckily similar to the darwin build.
- New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different
- added all necessary exeptions to the defines
- disabled priorities completely because on Windows they are defined 1-32 and with all the arbitrary +40 -40 priority settings there were a lot of problems
  not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate
  with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future
2018-01-05 14:47:33 -05:00
David Sidrane
fd7d399958 Upstream Nuttx restructured directories use micro_hal 2016-12-21 08:34:20 +01:00
Lorenz Meier
720c445f21 MAVLink: Code style 2016-08-26 23:43:33 +02:00
Beat Küng
2241ab9cac mavlink: add a shell using SERIAL_CONTROL MAVLink message 2016-07-29 13:07:17 +02:00