Commit Graph

244 Commits

Author SHA1 Message Date
Peter Johnson
07326edb6b Sim GUI: Add user rename support to SimDevice list (#2426) 2020-03-19 23:21:29 -07:00
Peter Johnson
31f4fd70ce Sim GUI: Fix crash when field/robot image load is canceled (#2362) 2020-02-15 09:53:21 -08:00
Peter Johnson
c165dc5e50 Simulation GUI: Add 2D field view (#2261)
The field image and robot image can be loaded or just a wireframe used.
The robot can be moved and rotated with a mouse click + drag.
The robot position is settable in robot code via the Field2d class.
2020-02-01 21:30:23 -08:00
Peter Johnson
9d7b087972 Simulation GUI: Add support for custom names (#2292)
This allows users to right click on just about any name in the GUI (e.g. "PWM[0]") and rename it (e.g. "Left Motor [0]"). The index portion is not editable. The name is saved into imgui.ini so it's persistent.
2020-01-20 22:47:36 -08:00
Peter Johnson
bb184ed481 Simulation GUI: Refactor ini saving (#2291) 2020-01-20 21:49:03 -08:00
Peter Johnson
822e75ec45 Simulator GUI: Handle save file having window size=0 (#2260)
This should never happen, but if it does, it's not recoverable without
either deleting imgui.ini or editing it manually.
2020-01-12 01:37:53 -08:00
Peter Johnson
f8294e689b Sim GUI: Add a bit of spacing to the analog inputs (#2170)
This helps make it clear they are separate controls.
2019-12-14 10:49:01 -08:00
Thad House
d003ec2dc9 Update to 2020v9 image (#2154)
- Fix VISA include and FPGA header
- Fix missing VISA lib from executables
2019-12-04 20:38:43 -08:00
Peter Johnson
e37ecd33ae Sim GUI: Add support for LED displays (#2138)
LED displays connect the LEDs in various ways (column major vs row major,
different starting locations, serpentine connection order), so add
configuration parameters for these options.
2019-12-01 21:28:02 -08:00
Tyler Veness
ffa4b907c0 Fix C++ floating point literal formatting (#2114)
Found formatting errors with this regex
"([^a-z0-9\.]\.[0-9]|[^a-z0-9\.][0-9]\.[^a-z0-9\.])" and ignored false
positives.

Fixes #2112.
2019-11-20 21:48:15 -08:00
Peter Johnson
77a9949bbf Add AddressableLED simulation GUI support 2019-11-18 00:51:59 -08:00
Peter Johnson
5d39bf8065 Make halsimgui::DrawLEDs() values parameter const (#2088) 2019-11-15 20:29:51 -08:00
Thad House
b7bc1ea745 Update to 2020v6 image (#2078) 2019-11-13 21:35:52 -08:00
Thad House
708009cd20 Update to gradle 6.0 (#2074) 2019-11-12 17:14:04 -08:00
Peter Johnson
1853f7b6b7 Add timing window to simulation GUI
This shows the FPGA time and notifier timing, and has buttons to
start/pause/step the simulation.

The GUI also pauses DS new data notifications when paused.  This could be
done globally instead by blocking NotifyNewData at the HAL level?
2019-11-11 22:03:29 -08:00
Thad House
9bcff37b93 Add HAL specific version of wpi_setError (#2055)
Cleans up error writing, and allows fewer headers to be included in many of the wpilibc cpp files.

This removes all usages of the hal/HAL.h header.
2019-11-08 22:53:20 -08:00
Peter Johnson
f22d0961e3 Sim GUI: Add duty cycle support 2019-11-02 21:43:57 -07:00
Peter Johnson
3262c2badb Sim GUI: Use new multi-channel PDP getter function 2019-11-02 21:43:57 -07:00
Tyler Veness
0b3821eba3 Change files with CRLF line endings to LF (#2022) 2019-11-01 20:26:05 -07:00
Peter Johnson
acf960f729 Sim GUI: Add option to disable outputs on DS disable 2019-10-21 16:16:17 -07:00
Peter Johnson
2d3dac99f0 Sim GUI: Handle low resolutions and scale default window positions
Low resolutions result in a maximized window and forced user scaling down
(by default, can still be changed by the user).
2019-10-21 16:16:17 -07:00
Peter Johnson
07c86e0cd5 Sim GUI: Support High DPI monitors
Add user setting for scaling on top of DPI scaling.
Add user setting for visual style (light/dark/normal).
Save window position, size, maximized state, scale, and style to ini file.
2019-10-21 16:16:17 -07:00
Peter Johnson
55af553acc Simulation GUI: Map gamepad the same way as DS 2019-10-21 16:16:17 -07:00
Peter Johnson
d726591ce4 Fix Gazebo sim plugin build (#1959) 2019-10-19 11:35:56 -07:00
Peter Johnson
2ff694fa49 Unbreak gradle build when other compilers installed (#1958)
There was dependency breakage in halsim_gui, which is only available on desktop.
2019-10-19 09:50:49 -07:00
Peter Johnson
2b4894038e Add simulation GUI plugin
This uses Dear Imgui to provide a cross-platform integrated GUI for robot
simulation. The GUI provides fully integrated DS and joystick support so it's
not necessary to run the official DS.
2019-10-06 17:28:39 -07:00
Peter Johnson
a9f0e46680 Implement sim devices for ADXL345, ADXL362, ADXRS450, Ultrasonic
This makes the halsim_adx_gyro_accelerometer simulation plugin and
the accelerometer part of lowfi_simulation obsolete.
2019-10-05 22:39:00 -07:00
Peter Johnson
e8d6f8a2c1 Move mockdata/HAL_Value.h to hal/Value.h
Also prefix the MakeBoolean et al functions with HAL_ to avoid namespace
pollution.
2019-10-05 22:39:00 -07:00
Peter Johnson
1b266717a8 Add simulation module support to cmake build (#1906) 2019-10-04 19:08:57 -07:00
Thad House
9afea33403 Add support for aarch64 jetson bionic builds (#1844) 2019-08-26 09:49:58 -07:00
Thad House
b2861f8948 Use 2020 artifacts and artifactory server (#1838)
Uses 2020 artifacts and artifactory server, and new versioning and repository plugins.
2019-08-22 21:48:43 -07:00
Tyler Veness
62be0392b6 Replace std::lock_guard and std::lock with std::scoped_lock (#1758)
std::scoped_lock was introduced in C++17 and is strictly better than
std::lock_guard as it supports locking any number of mutexes safely.
It's also easier to use than std::lock for locking multiple mutexes at
once.
2019-07-08 22:58:39 -07:00
Tyler Veness
841ef5d739 Remove template types from lock RAII wrapper usages (#1756)
C++17 has template type autodeduction. These wrappers include
std::lock_guard and std::unique_lock.
2019-07-07 19:17:14 -07:00
Thad House
804926fb5b Unconditionally skip athena builds for sim (#1748)
They'll pretty much never work
2019-06-30 19:45:33 -07:00
Thad House
5fe2eebceb Revert "Don't build halsim_gazebo on raspbian (#1737)" (#1743)
This reverts commit d9cb57a429.
2019-06-29 21:05:44 -07:00
Peter Johnson
d9cb57a429 Don't build halsim_gazebo on raspbian (#1737)
Reference shared/config.gradle instead of shared/plugins/setupBuild.gradle.
2019-06-28 22:30:17 -07:00
Thad House
0c45c5b7ea Fix skip athena and skip raspbian flags (#1735) 2019-06-28 20:00:09 -07:00
Thad House
3dfb01d45b Update to new Native Utils (#1696)
Also update to azure 2019 windows image
2019-06-28 14:09:10 -07:00
Thad House
221011494d Update for C++17 and fix MSVC warnings (#1694)
* Update MSVC arguments
* Fix json allocator
* Fix simulation diamond
* Bump gtest
* Remove empty varargs in unit tests
* Replace test case with test suite
* Remove deprecation warning in optional
* Remove need for NOMIXMAX to be defined in wpilib headers
2019-05-31 15:43:32 -05:00
Tyler Veness
f432f65bef Update copyright year in license to 2019 (#1524)
Also update clang-format to 6.0.
2019-05-17 17:35:09 -07:00
Thad House
1726b77ac5 wpiutil: uv: Remove copy from SimpleBufferPool (#1680) 2019-05-07 20:55:58 -07:00
Thad House
12cb77cd7c Fix DS Comm button tests (#1591)
Mac requires the double braces
2019-02-09 00:07:24 -08:00
Jaci Brunning
404666b298 Fix Halsim DS Button Format (#1583) 2019-02-01 23:23:04 -08:00
Jaci Brunning
bd05dfa1c7 Fix ds_socket matchinfo (#1555) 2019-01-16 21:32:34 -08:00
Thad House
799c3ea8a6 Disable gyro sim test on mac (#1506)
It fails with a mutex error very often, and we have not been able to figure out the issue.

It breaks CI.
2018-12-25 01:13:59 -06:00
Peter Johnson
dcbf02a1ec Update auto SPI for timestamp changes (#1457)
The 2019 FPGA image switched the output of auto SPI from plain bytes to a
sequence of 32-bit words (timestamp, then words with the byte values in the
least significant byte of each word).

In addition to changing the HAL and simulators to reflect this, add piecewise
integration support to wpilibc/wpilibj SPI to take advantage of the timestamps
and use it in the ADXRS450 gyro.
2018-12-06 22:29:20 -08:00
Thad House
5551981b3f Upgrade to Gradle 5.0 (#1444)
Also skip raspbian for gazebo.
2018-11-29 23:17:06 -08:00
Thad House
f0b0965f9b Remove large HAL headers from wpilibc headers (#1386)
Now only includes the types in the wpilib headers.
Should immensely clean up intellisense.

Closes #1383
2018-10-29 12:49:17 -07:00
Thad House
a8aacd3657 Update build setup for raspbian and debug binaries (#1384)
- Build both debug and release binaries
- Append "d" to debug libraries in the style of opencv
- Split shared and static classifiers
- Add raspbian support
2018-10-27 00:19:38 -07:00
Thad House
d2a5aaafdd Use external dependencies for NI and NetComm libraries (#1304)
This removes a number of large binary files from the repo and enables vendors
to depend on these libraries separately.
2018-09-19 21:57:58 -07:00