Ebin
a40de48809
AP_HAL_SITL: added BalanceBot to SITL_cmdline
2018-06-28 21:55:20 +09:00
Michael du Breuil
8680f1ab52
AP_HAL_SITL: Clear UART buffers when opening a port
2018-06-26 02:18:18 +01:00
Patrick José Pereira
cd5c59773b
AP_HAL_SITL: Use SITL, baro, INS and compass singletons
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira
a4d8ed4b75
AP_HAL_SITL: Use reinterpret_cast with AP_Param::find_object
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Francisco Ferreira
5de516dd6a
AP_HAL_SITL: remove underscore prefix for local variables
2018-06-20 16:38:52 +01:00
Francisco Ferreira
06c41bc768
AP_HAL_SITL: re-use unused FDM address option for FG view IP address
2018-06-20 16:38:52 +01:00
Francisco Ferreira
46868409ec
AP_HAL_SITL: remove unused code
2018-06-20 16:38:52 +01:00
Peter Barker
f2a842e415
AP_HAL_SITL: set_cloexec on SITL's RCIN port
2018-06-19 09:14:28 +10:00
Peter Barker
574a2b3652
AP_HAL_SITL: set cloexec on port 5760
2018-06-19 09:14:28 +10:00
Peter Barker
00153f513c
AP_HAL_SITL: use OS clock for get_hw_rtc
2018-06-15 08:01:22 +10:00
Carlos Martínez Úbeda
30e0c7f746
AP_HAL_SITL: use FD_CLOEXEC instead of linux SOCK_CLOEXEC for socket
2018-06-10 19:15:50 +01:00
Michael du Breuil
0f2482f05b
AP_HAL_SITL: Remove timer process suspension interface
2018-06-06 07:16:58 +10:00
Michael du Breuil
9c288df8d7
AP_HAL_SITL: Remove RC overrides
2018-06-05 09:51:09 +10:00
Pierre Kancir
b615677223
HAL_SITL: implement reboot support
2018-05-30 18:48:53 +10:00
Pierre Kancir
7732b41186
AP_HAL_SITL: fix static member access through instance
2018-05-30 18:48:53 +10:00
Pierre Kancir
f986f1366f
AP_HAL_SITL: set close-on-exec flag on uart socket
2018-05-30 18:48:53 +10:00
Patrick José Pereira
b014b6c857
AP_Baro: Use SSL variables
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-05-23 02:36:43 +01:00
Andrew Tridgell
049e3ae02d
HAL_SITL: take account of available bytes in receive_time_constraint_us
2018-05-21 14:53:18 +10:00
Andrew Tridgell
4e452c77f8
HAL_SITL: implement UART timestamp API
2018-05-16 18:49:22 +10:00
Michael du Breuil
97696281ae
AP_HAL_SITL: Remove set_overrides() method
2018-05-11 12:13:39 +01:00
Andrew Tridgell
f8464577ac
Revert "SITL: Instance number change MavID"
...
This reverts commit 507f4d688b
.
This broke normal usage of sim_vehicle.py
2018-05-10 09:56:38 +10:00
Pierre Kancir
507f4d688b
SITL: Instance number change MavID
2018-05-09 22:00:42 +10:00
Peter Barker
190bd18769
AP_HAL_SITL: move delay callback handling to base HAL Scheduler class
2018-05-09 16:15:38 +10:00
Eugene Shamaev
5d4579a086
AP_HAL_SITL: add wind type parameters
2018-05-02 07:32:25 -07:00
Peter Barker
1eecf07e68
AP_HAL_SITL: use a 16-bit mask for GPIO out
...
This allows Relay pins to be represented (typically pin 13)
2018-04-18 20:31:55 +09:00
Peter Barker
4db9a5e6fe
AP_HAL_SITL: remove cast to signed type
...
... we're currently taking an unsigned type, casting it to a signed type
and then comparing the result of that to an unsigned type. That's
unhealthy.
2018-04-03 13:08:56 +01:00
Peter Barker
7d271e0f3c
AP_HAL_SITL: check return value of setsockopt
2018-04-02 09:23:27 +09:00
Michael du Breuil
5bd4091976
AP_HAL_SITL: Protect against nullpointer dereference
2018-03-31 16:15:48 +09:00
Michael du Breuil
8dd55a85cd
SITL: Create a second voltage to monitor for battery voltages
2018-03-27 22:12:21 +01:00
Peter Barker
85b41a8abb
AP_HAL_SITL: add vicon-over-mavlink support
2018-03-27 20:28:51 +09:00
Peter Barker
1151d76345
AP_HAL_SITL: sim: namespace for specifying SITL devices from cmdline
2018-03-27 20:28:50 +09:00
Eugene Shamaev
40e2d0d0c9
AP_HAL_SITL: SITL of several airspeed sensors
2018-03-09 11:27:20 -08:00
Andrew Tridgell
403ba0c325
HAL_SITL: cope with cygwin64
2018-03-02 17:11:31 +11:00
Peter Barker
6a862c6e24
SITL: make home location parsing verbose
...
Given we don't fail to start SITL if the home location fails to parse,
we should at least make the user very aware that their home location
string is bad.
This commit makes failures verbose, and outputs the parsed location
values rather than regurgitating the location string the user supplied;
it was very misleading in that the location could simply fail to parse
and thus be unused.
2018-02-21 23:51:56 +10:00
Andrew Tridgell
e276edbb03
HAL_SITL: implement _timer_tick in UARTDriver
2018-02-07 20:33:45 +11:00
Nicholas Engle
8b08e9388d
AP_HAL_SITL: Add SIM_WIND_DIR_Z parameter for SITL
...
This controls the vertical pitch of the 3d wind vector, allowing futher control of the wind
using systems like dronekit. This change directly effects the calcuation of the wind vector
2018-02-05 16:38:53 -08:00
Andrew Tridgell
6558da2c4c
HAL_SITL: fixed valgrind error in ubx driver
...
this was causing a valgrind error on all runs with a virtual ublox GPS
2018-01-24 18:00:42 -07:00
Siddharth Purohit
a6be19d8cf
HAL_SITL: fix sitl build for mac osx
2018-01-20 17:35:08 +11:00
Michael du Breuil
8ef7e61066
AP_HAL_SITL: Spam u-blox NAV-SVINFO at 0.1Hz
...
This resolves EKF3 being hung on launch
2018-01-13 10:13:00 +09:00
Tom Pittenger
da11241aa8
AP_HAL_SITL: add const
2017-12-02 09:17:27 +09:00
Andrew Tridgell
da4d3ebe2b
HAL_SITL: fixed UART utils for cygwin and Linux
2017-12-01 08:02:48 +11:00
Tom Pittenger
6bdbe53024
AP_HAL_SITL: fix compile error for Windows/Cygwin builds
...
termios2 not available on cygwin. This needs a re-think for cygwin. For now let's just hide it by letting it be declared empty by the virtual and totally bypass it in the cygwin build.
2017-11-30 12:17:49 -08:00
Tom Pittenger
013035a4da
AP_HAL_SITL: fix compile error for Windows/Cygwin builds
...
Can not find "asm/termios.h"
2017-11-30 12:05:56 -08:00
Tom Pittenger
760c6185e5
AP_HAL_SITL: remove SBUS debug code
2017-11-30 12:03:17 -08:00
Pierre Kancir
c30642a348
AP_HAL_SITL: correct _unbuffered_writes usage
2017-11-30 10:36:54 -08:00
Mark Whitehorn
5a417e3152
AP_HAL_SITL: support SBusOut
...
add uart config methods
2017-11-30 10:20:04 +11:00
Andrew Tridgell
ebcffcb0ac
HAL_SITL: fixed console printf in SITL examples
2017-11-23 14:26:11 +11:00
Jacob Walser
46ac0e45aa
AP_HAL_SITL: initialize rc inputs appropriately for ArduSub
2017-11-22 15:43:46 -05:00
khancyr
4413ebab7b
AP_HAL_SITL: suppress output until initialization is finished
2017-11-13 10:52:38 +11:00
Jacob Walser
07fa65a88c
AP_HAL_SITL: Add current and voltage monitoring implementation for Sub
2017-11-13 10:50:27 +11:00
Andrew Tridgell
7def86ae96
HAL_SITL: don't run IO at more than 100Hz
...
save some CPU for faster frame rates
2017-10-21 11:57:05 +11:00
Mark Whitehorn
dedb40ce0b
SITL: add parameter to simulate reversed pitot tube order
2017-09-22 18:21:09 +10:00
Peter Barker
0f54cc9b22
AP_HAL_SITL: implement in_main_thread
2017-09-19 09:40:11 +10:00
Andrew Tridgell
25c7ee4d42
AP_HAL_SITL: added SIM_GPS_ALT_OFS
...
this is used to give a bad GPS height in SITL, which is very useful for
testing origin vs home issues
2017-09-18 10:24:45 +10:00
Michael du Breuil
58e784024f
AP_HAL_SITL: Add support for blocked pitot tube simulations
2017-08-10 20:15:35 +10:00
Lucas De Marchi
5ea1784838
global: remove AP_HAL::in_timerprocess()
...
This is not used and in the only places it would make sense would be
internally to the scheduler so remove it.
2017-08-03 20:25:14 -07:00
Andrew Tridgell
42181ee7c8
HAL_SITL: use SIM_GPS_LOCKTIME
2017-07-14 15:02:14 +10:00
Miguel Arroyo
86b9942d51
AP_HAL_SITL: move SITL Compass to standard sensor backend model
2017-06-29 09:22:08 +10:00
Miguel Arroyo
4394c5145b
AP_HAL_SITL: Fixes bug with uartF.
...
uartF _timer_tick() was not being called in the scheduler.
2017-06-26 13:05:16 +01:00
Pierre Kancir
1c8d169814
AP_HAL_SITL: sitl_airspeed simplify include
2017-06-07 20:29:02 +10:00
Pierre Kancir
775ca9303a
AP_HAL_SITL: sitl_airspeed correct style
2017-06-07 20:29:02 +10:00
Pierre Kancir
0afc907b0a
AP_HAL_SITL: rename sitl_ins & _update_ins to sitl_airspeed & _update_airspeed
2017-06-07 20:29:02 +10:00
Pierre Kancir
22dd81e298
AP_HAL_SITL: rangefinder const correctness
2017-06-07 20:28:25 +10:00
Pierre Kancir
3f045a4905
AP_HAL_SITL: airspeed_simulated use is_zero
2017-06-07 20:28:25 +10:00
Pierre Kancir
4acf4538c7
AP_HAL_SITL: rangefinder don't adjust value from FDM on external data
2017-06-07 20:28:25 +10:00
Pierre Kancir
599e3d7b83
SITL: make range finder a standalone sitl plugin
2017-06-07 20:28:25 +10:00
murata
c21b586ccc
SITL: add dodeca-hexa support
2017-05-27 14:21:13 +09:00
Andrew Tridgell
e51bbcebec
AP_HAL_SITL: rename macros to avoid conflicts
...
these macros were also defined in NuttX in clock.h
2017-05-06 15:21:14 +10:00
Andrew Tridgell
ac82d1a65d
HAL_SITL: moved SITL baro to AP_Baro_SITL
2017-05-03 20:12:04 +10:00
Peter Barker
2f79a5bd90
AP_HAL_SITL: use HAL_SEMAPHORE_BLOCK_FOREVER
2017-05-01 15:05:51 +01:00
Andrew Tridgell
f257a869ac
HAL_SITL: make cork/push safe to call nested
2017-05-01 14:32:18 +10:00
Pierre Kancir
f8d6b5fc9c
AP_HAL_SITL: Allow to use a second type of gps for all type
2017-04-26 18:34:56 +01:00
Pierre Kancir
f0f7ca2386
SITL: State constrain rover motor input between 1000 and 2000
2017-04-26 10:38:01 +10:00
Pierre Kancir
327ac07d54
AP_HAL_SITL: gps correct glitchs
2017-04-19 17:44:29 +01:00
Niels Joubert
873915d82b
AP_HAL_SITL: Support both SBPv0 and SBPv2
2017-04-18 18:25:54 +01:00
Andrew Tridgell
961da9deb8
HAL_SITL: use quaterion instead of eulers
2017-04-16 14:01:36 +10:00
Eugene Shamaev
d81af8700f
AP_HAL_SITL: definitions for CAN bus
2017-04-10 22:38:12 +01:00
Andrew Tridgell
3236090d71
HAL_SITL: allow plane and rover to use SIM_ENGINE_FAIL
2017-04-09 16:45:19 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas
b4260c77be
Add and update missing SITL command line usage information
2017-04-05 20:17:40 +10:00
Guilherme Sousa
584890a864
AP_HAL_SITL: Fail motors with SIM_ENGINE_FAIL
2017-03-29 22:43:14 +11:00
Michael du Breuil
2aec41e0ef
AP_HAL_SITL: Fix SIM_GPS_DISABLE not disabling the ublox GPS with PVT support
2017-03-19 23:13:11 -07:00
Pierre Kancir
d4a0a92b8b
SITL: cmdline reorder help and param for better readability and futher extension
...
add missing options
2017-03-18 19:58:11 +11:00
Pierre Kancir
ee7355a301
SITL: Reduce some variables scope and include
2017-03-18 19:58:11 +11:00
Pierre Kancir
8054405521
SITL: Change interface port to a generic solution for external simulator
2017-03-18 19:58:11 +11:00
Pierre Kancir
6e0319d513
SITL: Add RCout port option to cmdline
2017-03-18 19:58:11 +11:00
Pierre Kancir
a8d5079a38
SITL: Ensure that Instance parameter don't override manualy setted port
2017-03-18 19:58:11 +11:00
Tully Foote
25fad0a8c2
SITL: Add more command line arguments for port selection.
2017-03-18 19:58:11 +11:00
Pierre Kancir
5b8c89225a
SITL: Make socket more verbose
2017-03-18 19:58:11 +11:00
Pierre Kancir
567a8d68e5
SITL: Make socket error more verbose
2017-03-18 19:58:11 +11:00
Pierre Kancir
1bb4e3c9b7
AP_IRLock_SITL: make port variable
2017-03-18 19:58:11 +11:00
Pierre Kancir
63ea8c6f21
SITL: enable multi sitl for gazebo
2017-03-18 19:58:11 +11:00
Randy Mackay
341b926a43
AP_HAL_SITL: add glitch for 2nd ublox
2017-03-13 11:31:51 +11:00
Jacob Walser
e7caf05238
AP_HAL_SITL: Add support for Sub
2017-02-21 11:26:14 +11:00
Michael du Breuil
c716e76bfc
AP_HAL_SITL: Apply a GPS noise parameter
2017-02-13 09:23:14 +11:00
murata
30151c8253
Global: Define MSEC_PER_SEC, MSEC_PER_WEEK, SEC_PER_WEEK and UNIX_OFFSET.
2017-02-11 01:34:09 -08:00
Peter Barker
eb6826f7de
SITL: avoid use of uninitialised memory
2017-02-05 01:07:32 +00:00
murata
67fdbf5c2d
AP_HAL_SITL: Unify from print or println to printf.
2017-01-27 18:20:22 +11:00
Michael Oborne
d05b0d5885
AP_GPS_UBLOX: add pvt message support
2017-01-25 03:34:26 +00:00
Michael du Breuil
d5a5a97a3d
SITL: Use the GPS_LEAPSECOND define
2017-01-18 18:07:26 +00:00
Peter Barker
e9a0e98863
AP_HAL_SITL: use fabs on double values
2017-01-17 09:41:37 -08:00
Andrew Tridgell
117974ef0f
HAL_SITL: obey enable mask for output channels
2017-01-12 17:39:37 +11:00
Pierre Kancir
ab9e88299f
AP_HAL_SITL: Scheduler remove unreachable code & minor fix
...
usleep wasn't reached since synthetic clock is always used
correct style
make constructor explicit
use c++ cast
2017-01-12 01:27:16 +00:00
Pierre Kancir
63b3618fc7
AP_HAL_SITL: RCOuput minor fix
...
correct style
make constructor explicit
use c++ cast
2017-01-12 01:20:06 +00:00
Pierre Kancir
ff46964d22
AP_HAL_SITL: RCInput minor fix
...
fix style
make constructor explicit
remove unused _valid
correct read to return real length instead of fixed 8
correct implicit cast
2017-01-12 01:19:54 +00:00
Pierre Kancir
7f5b32f59f
AP_HAL_SITL: GPIO minor fixes
...
fix style
make constructor explicit
fix implicit cast for unsigned to signed value
correct DigitalSource constructor definition
2017-01-12 01:06:20 +00:00
Pierre Kancir
8ade9d1fe8
AP_HAL_SITL: style fixes
2017-01-12 01:06:20 +00:00
Pierre Kancir
5b2b4430b3
AP_HAL_SITL: AnalogIn minor fixes
...
change pin to int16_t to match real implementation and prevent casting.
make constructor explicit
2017-01-12 01:06:20 +00:00
Pierre Kancir
f9c8827809
SITL: Scheduler correct misplaced parenthese && switch to do while loop
2016-12-04 18:28:14 +00:00
Andrew Tridgell
7ba957b946
HAL_SITL: flush stdout on panic
2016-12-02 09:49:38 +11:00
Andrew Tridgell
def6e014cf
HAL_SITL: removed old optflow simulation
2016-11-28 08:26:56 +11:00
Pierre Kancir
84aaca7c6e
SITL: add missing break
2016-11-17 13:46:10 +00:00
Pierre Kancir
86c8145bd9
SITL: Change Flighgear port with instance number
2016-11-16 08:27:48 +11:00
Pierre Kancir
c4b5bd4bd9
SITL: revert fg view to activate by default and use flag to disable it
2016-11-16 08:27:48 +11:00
Pierre Kancir
e2b939df39
SITL: rename simin to rcin for better readability
2016-11-16 08:27:48 +11:00
Pierre Kancir
59c84c637e
SITL: make fg view optional
2016-11-16 08:27:48 +11:00
Lucas De Marchi
f6d475c1e6
AP_HAL_SITL: add O_CLOEXEC in places missing it
...
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
priseborough
747f3a8cfd
AP_HAL_SITL: Simulate range finder position offset
2016-10-27 14:54:44 +11:00
priseborough
a9f63abc6f
AP_HAL_SITL: simulate effect of GPS antenna offset
2016-10-27 14:54:44 +11:00
priseborough
3afe2b1694
AP_HAL_SITL: simulate optical flow sensor body frame position offset
2016-10-27 14:54:44 +11:00
Peter Barker
dd7d41b1f3
SITL: unhide groups when generating parameters in autotest
2016-10-26 09:53:14 +11:00
Andrew Tridgell
d2287caf1c
HAL_SITL: removed old servo slew rate code
2016-10-25 20:39:38 +11:00
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell
97d0553938
HAL_SITL: implement cork() on RCOutput
2016-10-13 10:00:04 +11:00
Michael Oborne
11c376588d
AP_GPS_NOVA: support tersus/novatel/comnav gps
2016-09-20 10:53:49 +10:00
Andrew Tridgell
25f1dbd8c2
HAL_SITL: allowed SITL to reopen uart connections
2016-08-23 09:30:17 +10:00
Murilo Belluzzo
077e03678f
Global: Adapt Stream class to be used with Ringbuffer
2016-08-03 01:44:02 -03:00
Peter Barker
9749b91d46
SITL: initialise sigaction structs - valgrind fix
2016-07-29 10:38:03 -03:00
Lucas De Marchi
d418338e22
AP_HAL_SITL: remove I2CDriver
...
I2CDevice now serves for the same purpose.
2016-07-28 18:08:57 -03:00
Staroselskii Georgii
d69aeb4808
AP_HAL_SITL: use sigaction over signal API in SITL_State
2016-07-27 21:30:19 +10:00
Andrew Tridgell
d7faeada87
HAL_SITL: notify GCS on GPIO changes
...
useful for testing relays in SITL
2016-07-22 15:01:21 +10:00
Andrew Tridgell
5b081a704c
HAL_SITL: added GPIO simulation
...
using SIM_PIN_MASK
2016-07-22 15:01:20 +10:00
Tom Pittenger
acaf0c6a5d
SITL: LPF the SIM_WIND_DIR and SIM_WIND_SPD values to eliminate step inputs
2016-07-15 18:37:40 -07:00
Siddharth Bharat Purohit
d65f453da1
AP_HAL_SITL:use common fenv function
2016-07-07 11:35:18 -03:00
Andrew Tridgell
fc9283964a
HAL_SITL: fixed segv on cygwin
2016-06-30 20:45:03 +10:00
Peter Barker
309ac53806
SITL: correct adsb initialisation
...
Parameters have not yet been initialised in _sitl_setup, so move
should-run checks into update
2016-06-20 18:16:34 -07:00
Andrew Tridgell
acc76f80b0
HAL_SITL: added xplane support
2016-06-19 13:59:15 +10:00
Paul Riseborough
2cf5493b40
AP_HAL_SITL: Ensure simulated magnetic field is always used
2016-06-19 12:51:34 +10:00
Tom Pittenger
1770f314ac
SITL: change SIM_ADSB default to -1 to default disabled to leave telem port available
2016-06-15 17:22:54 -07:00
Tom Pittenger
52fcc36249
AP_HAL_SITL: remove -A --adsb argument, feature is now always enabled controlled by param
2016-06-14 21:05:23 -07:00
Tom Pittenger
f2b5f5f4a5
AP_HAL_SITL: adsb is always enabled in the sim, controlled by param SIM_ADSB_COUNT
2016-06-14 21:03:30 -07:00
Andrew Tridgell
0166ab2038
HAL_SITL: check for SIM_RC_FAIL
2016-06-05 05:54:56 +10:00
Tom Pittenger
5df2e57209
AP_HAL_SITL: do not compile terrain class when terrain is not disabled via compile flag
2016-06-03 11:07:36 -07:00
Andrew Tridgell
04f87a452e
HAL_SITL: fixed tcp client mode
2016-05-30 16:42:28 +10:00
Andrew Tridgell
969b6ebea9
HAL_SITL: support coaxcopter in SITL
2016-05-26 17:09:22 +10:00
Andrew Tridgell
a80e233836
HAL_SITL: added SingleCopter
2016-05-26 16:30:39 +10:00
Andrew Tridgell
635a975486
HAL_SITL: use a smaller buffer for real SITL UARTs
...
better emulation of real hw
2016-05-23 23:41:02 +10:00
Tom Pittenger
ad11f3815b
AP_HAL_SITL: rename aspd variables to arspd
2016-05-17 16:36:14 -07:00
Gustavo Jose de Sousa
2246343ec7
AP_HAL_SITL: pass signed value to abs()
...
Passing an unsigned value to abs() causes compilation error in gcc 6.1.1
(and doing that doesn't make sense too).
As a bonus, this patch fixes the code, since, for two unsigned integers
a and b, such that a > b, (a - b) without the casting to a signed
integer would produce garbage in the context of this patch. The type
int32_t is enough for the cases covered by this patch.
2016-05-16 15:04:22 -03:00
Peter Barker
8d5ceda534
AP_HAL_SITL: ensure specified SITL model is found
...
Without this check we get a null pointer exception the first time we attempt
to use the model object
2016-05-16 13:04:15 -03:00