Commit Graph

615 Commits

Author SHA1 Message Date
Andy Piper 7238c603c1 AP_HAL_SITL: compile system as double so that time advances 2023-08-02 16:22:59 +01:00
Peter Barker 7b83ccfdd1 AP_HAL_SITL: change SITL unbuffered writes to more-closely minim ChibiOS HAL
We don't ever actually do unbuffered writes in ChibiOS.  We just poke the relevant thread to say there's data available.  This kind of mimics that my instantly evoking the same routine the timer-tick method does, which may or may not get all of the bytes out in good order.
2023-07-26 17:06:27 +10:00
Peter Barker 2cb3265131 AP_HAL_SITL: factor _timer_tick into read/write methods 2023-07-26 17:06:27 +10:00
Peter Barker 32659fd3b6 AP_HAL_SITL: correct return values on UARTDriver write call 2023-07-18 11:17:01 +10:00
Peter Barker f288ba7cd0 AP_HAL_SITL: correct parsing of --rate on SITL commandline
it's in the help but not in the code...
2023-07-15 00:13:12 +10:00
Peter Barker efc7b4b6ee AP_HAL_SITL: remove race in SITL::UARTDriver::_write
txspace could change if another thread is involved
2023-07-13 18:13:42 +10:00
Andy Piper d36149e1a8 AP_HAL_SITL: remove unused counter 2023-07-13 11:02:40 +10:00
Peter Barker 2c9551a25a AP_HAL_SITL: act on safety switch being enabled in SITL by zeroing outputs 2023-07-12 17:53:12 +10:00
Andrew Tridgell 6e952bae17 HAL_SITL: allow override of serial devices in SITL periph 2023-07-12 17:06:02 +10:00
Andrew Tridgell fca6f2cba2 HAL_SITL: fixed crash with command line args to SITL periph 2023-07-12 17:06:02 +10:00
Andrew Tridgell 4f81a40066 AP_HAL_SITL: moved UART port locking up to AP_HAL 2023-07-12 17:06:02 +10:00
rishabsingh3003 4957785fef AP_HAL_STIL: add simulated nooploop tofsense rangefinder 2023-06-28 17:16:22 +10:00
Andrew Tridgell 3bcceb9420 HAL_SITL: fixed multicast UDP on cygwin
this will allow the SITL button on cygwin to work with multicast,
allowing for complex vehicle interactions between machines
2023-06-26 15:49:02 +10:00
muramura bfa23aa7b0 AP_HAL_SITL: Resolve missing-declarations errors 2023-06-19 20:14:31 +10:00
acxz ade161f0a8 AP_HAL_SITL: remove std:: scope from uint16_t 2023-05-17 11:15:43 +10:00
Peter Barker ae7fb93e4c AP_HAL_SITL: add simulated RPLidarA1 2023-05-16 10:15:23 +10:00
Peter Barker 4ed4c2d554 AP_HAL_SITL: add simulator for RDS02UF rangefinder 2023-05-13 20:05:18 +10:00
Jonathan Challinger 28598e82c0 AP_HAL_SITL: fix sitl_periph_gps build 2023-05-09 11:42:09 +10:00
Jonathan Challinger 4ef070956d AP_HAL_SITL: ADC resolution configurable by define, default to 16 bit 2023-05-09 11:42:09 +10:00
Andy Piper c0b008902f AP_HAL_SITL: rename QSPIDevice to WSPIDevice 2023-04-28 08:31:15 +10:00
Andrew Tridgell 761297a068 AP_HAL_SITL: change to 16 bit timeout in event interface
prevent issues on 16 bit timers where we can end up with TIME_INFINITE
2023-04-19 17:26:57 +10:00
Andrew Tridgell 81b1b69cd5 HAL_SITL: fixed receive of CANFD in SITL socketcan
we need to use read() and look at the size to work out if each frame
is bxCAN of CANFD

See https://www.kernel.org/doc/Documentation/networking/can.txt
2023-04-10 14:46:54 +10:00
Andrew Tridgell a960e647b5 HAL_SITL: fixed sitl periph storage
this allows persistent parameters for sitl_periph_gps target
2023-04-10 14:46:54 +10:00
Andrew Tridgell b6ae79c700 HAL_SITL: fixed 64 bit periph build 2023-04-10 14:46:54 +10:00
Andrew Tridgell baa7301977 HAL_SITL: fixed valgrind error 2023-04-08 07:11:23 +10:00
bugobliterator b65c74940d AP_HAL_SITL: setup for DroneCAN driver test build 2023-03-29 17:16:39 +11:00
Peter Barker d626197c0b AP_HAL_SITL: add and use a "bool read(c)" method to AP_HAL
this is much less likely to not work vs the int16_t equivalent
2023-03-22 17:59:11 +11:00
Samuel Tabor 49fb4f37c5 SITL: Send VCAS in Flightgear packet. 2023-02-20 05:37:21 -08:00
Peter Barker ffa43c1b71 AP_HAL_SITL: avoid using struct Location
clang reports this could be a problem when compiling under some EABIs.  Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h
2023-02-04 22:51:54 +11:00
Andrew Tridgell b43701fffa HAL_SITL: exit on close of port 0 on cygwin
this fixes a long standing problem with SITL not exiting when you
close connection in MissionPlanner
2023-01-24 15:48:04 +11:00
Ian 636f9bffa9 AP_HAL_SITL: Add new SITL driver for Webots 2023a
The new SITL driver is based on the existing SITL driver for Gazebo and
does not require a JSON parser and implements set_interface_ports.
2023-01-22 18:19:38 +11:00
Peter Barker ccf290246c AP_HAL_SITL: use parameter to enable/disable SITL ESC telem
this is the perfect telemetry stream; we don't want to override other telemetry streams
2023-01-18 18:07:23 +11:00
Peter Barker 6c03134169 AP_HAL_SITL: use AP_CSVReader to read from Log serial-async dump 2023-01-17 11:21:48 +11:00
Andrew Tridgell 12c24df476 AP_HAL_SITL: added old_size to heap_realloc 2023-01-16 09:19:16 +11:00
Andrew Tridgell a2b0bbffdb HAL_SITL: implement SIM_UART_LOSS 2023-01-15 21:57:15 +11:00
Peter Barker c728483a7e AP_HAL_SITL: add option to create uart connection to file 2023-01-04 12:29:49 +11:00
Andy Piper 5ea3415a41 AP_HAL_SITL: allow SITL sketches to run
allow sketchname to be set
2022-12-28 18:14:56 +11:00
Andrew Tridgell 21b4a19c6f HAL_SITL: implement CAN get_statistics() 2022-12-13 16:56:57 +11:00
Andrew Tridgell 1c554ccc24 HAL_SITL: only do the cygwin speedup hack for scripting while armed
this stops us chewing lots of CPU while disarmed, and also stops the
logging thread from chewing a lot of CPU
2022-11-10 12:12:03 +11:00
Andrew Tridgell 1488edb1d8 HAL_SITL: fixed sleep time with speedup
and removed sleep in threads for cygwin, as granulatity of sleep is
too high, resuling in very poor lua performance
2022-11-07 21:22:43 +11:00
Peter Barker e7d30aefec AP_HAL_SITL: include required AP_Vehicle_Type header 2022-11-02 18:35:48 +11:00
Andrew Tridgell 1871c6bef7 HAL_SITL: use motor mask for noise checking for motors 2022-10-16 20:38:19 +11:00
Peter Barker 0d5d9c04f0 AP_HAL_SITL: SITL SerialDevice optionally checks baudrates match 2022-09-28 20:53:34 +10:00
Yuri 20f0fd0589 AP_HAL_SITL: increase short board names to 23 chars 2022-09-21 17:56:42 +10:00
murata 64c60c8149 AP_HAL_SITL: Accurate 10 counts 2022-09-16 08:53:16 +10:00
Peter Barker fb3a7d0d10 AP_HAL_SITL: do not return from reboot command
This structure was set up to mimic the should_exit code originally from the Linux HAL.  It runs contrary to the intent of the HAL reboot call, which is not expected to return.  This oddity leads us to emit wo acks sequentially, one success, one failure, which is just weird.
2022-09-14 21:23:18 +10:00
Andrew Tridgell 53997a284b AP_HAL_SITL: fixes from --ubsan autotest 2022-09-06 10:49:50 +10:00
Jeffrey Laut 3133aff352 SITL: fix simulated RC failure while receiving RC overrides 2022-09-02 12:08:34 +10:00
Peter Barker 1c7e2f5094 AP_HAL_SITL: correct bind-value SIM_RC_FAIL handling
If SITL is not receiving any sitl rc input (so _sitl_rc_in.recv(...) is allways returns -1 then the bind-values code would never be crossed so the RC input values would remain at their initialisation values rather than honouring the SIM_RC_FAIL setting which says they should go to bind values (notably throttle-to-950)
2022-08-10 17:14:21 +10:00
Henry Wurzburg e682296b58 AP_HAL_SITL: add TeraRange Neo Rangefinder 2022-08-09 09:01:34 +10:00