Commit Graph

395 Commits

Author SHA1 Message Date
Gold856
e0e774abde [commands, wpimath] Remove Mecanum/SwerveControllerCommand and HolonomicDriveController (#8119) 2025-07-31 23:05:42 -07:00
Peter Johnson
f3af50fc8e [hal, wpilib] Update Addressable LED support (#8100) 2025-07-21 21:52:10 -07:00
sciencewhiz
09680072ac [examples] Add Snippets for Accelerometers using OnboardIMU (#8087) 2025-07-20 22:19:14 -07:00
Thad House
3497a7d09f [hal] Add frequency support to DutyCycle (#8076) 2025-07-14 23:46:17 -07:00
Peter Johnson
7142fb1f5f Merge branch 'main' into 2027 2025-07-08 19:54:03 -07:00
Austin Schuh
44d42759a4 Work around gcc 12 overlap memory region warning (#8058)
Thad says this is a compiler bug, rather than fight it, let's use a new
code path through the compiler.

ERROR: /home/austin/local/allwpilib3/wpilibcExamples/BUILD.bazel:50:12: Compiling wpilibcExamples/src/main/cpp/examples/I2CCommunication/cpp/Robot.cpp failed: (Exit 1): gcc failed: error executing CppCompile command (from target //wpilibcExamples:I2CCommunication-test) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 234 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from /usr/include/c++/12/ios:40,
                 from /usr/include/c++/12/istream:38,
                 from /usr/include/c++/12/sstream:38,
                 from /usr/include/c++/12/chrono:41,
                 from bazel-out/k8-opt/bin/wpilibc/_virtual_includes/wpilibc.static/frc/TimedRobot.h:7,
                 from bazel-out/k8-opt/bin/wpilibcExamples/_virtual_includes/I2CCommunication-examples-headers/Robot.h:10,
                 from wpilibcExamples/src/main/cpp/examples/I2CCommunication/cpp/Robot.cpp:5:
In static member function 'static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)',
    inlined from 'static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/basic_string.h:423:21,
    inlined from 'static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/basic_string.h:418:7,
    inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/basic_string.tcc:532:22,
    inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/basic_string.h:1647:19,
    inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/basic_string.h:815:28,
    inlined from 'virtual void Robot::RobotPeriodic()' at wpilibcExamples/src/main/cpp/examples/I2CCommunication/cpp/Robot.cpp:27:77:
/usr/include/c++/12/bits/char_traits.h:431:56: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 9223372036854775810 or more bytes at offsets -4611686018427387902 and [-4611686018427387903, 4611686018427387904] may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
  431 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
2025-07-03 22:58:47 -07:00
Gold856
26771e38fb [commands] Deprecate Command.schedule() (#7072)
It's only syntactic sugar over the CommandScheduler's schedule method and creates a footgun because it’s too obvious to try to use in incorrect places.

Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
2025-07-02 13:46:59 -07:00
PJ Reiniger
fbbc4bc53c [bazel] Clean up bazel scripts (#7984) 2025-06-13 20:53:09 -07:00
Peter Johnson
a6f601453a [examples] Fix up merge from main (#7994) 2025-05-30 17:36:53 -07:00
Peter Johnson
6c16e846fa Merge branch 'main' into 2027 2025-05-29 21:41:50 -07:00
sciencewhiz
79a9d7f987 [examples] Add Accelerometer filtering snippets 2025-05-13 22:03:22 -07:00
sciencewhiz
0877d130be [examples] Add Accelerometer collision detection snippets 2025-05-13 22:03:22 -07:00
sciencewhiz
89555383cc [examples] Add BuiltInAccelerometer Snippet 2025-05-13 22:03:22 -07:00
sciencewhiz
de315947e9 [examples] Add ADXL 345 and 362 snippets 2025-05-13 22:03:22 -07:00
sciencewhiz
b7cd03adc4 [examples] Add AnalogAccelerometer snippets
Delete AnalogAccelerometer comments about sensitivity and zero constants that don't exist
2025-05-13 22:03:22 -07:00
sciencewhiz
55a97f0c11 [examples] Add Analog Potentiometer Snippets (#7957) 2025-05-10 07:18:19 -07:00
sciencewhiz
b96264f042 [examples] Misc fixes for snippets (#7952) 2025-05-04 00:13:46 -07:00
sciencewhiz
a15152712f [examples] Add AnalogInput snippets (#7951) 2025-05-04 00:13:20 -07:00
Eric
17cae787e7 [commands] Mark CommandPtr class as [[nodiscard]] (#7803)
This has the same effect but makes it so any user code returning CommandPtr can't discard a returned command.

Signed-off-by: Eric Ward <ezeward4@gmail.com>
2025-05-03 20:44:55 -07:00
sciencewhiz
e63899e63a [examples] Add snippets for Digital Input article (#7949) 2025-05-01 11:40:38 -06:00
sciencewhiz
c49fc29046 [examples] Add Limit Switch snippets (#7946) 2025-04-29 08:42:32 -06:00
sciencewhiz
659710a79a [examples] Add remaining Encoder snippets (#7936) 2025-04-28 16:25:49 -07:00
Thad House
08297430b5 [hal,wpilib] Add support for second I2C port (#7878) 2025-04-28 09:29:01 -06:00
Peter Johnson
36811211be Merge branch 'main' into 2027 2025-04-25 23:45:43 -07:00
Gold856
2f0990e9d2 [commands] Remove control commands and subsystems (#7921) 2025-04-25 22:06:26 -07:00
sciencewhiz
90ee11a9e0 [examples] Add DutyCycleEncoder Snippets (#7930) 2025-04-25 21:47:53 -07:00
sciencewhiz
21d921184a [examples] Add compilable code snippets (#7909)
This enables frc-docs to use RLIs for things that are currently in-line
code blocks, and ensures they compile, which is important with the 2027
breaking changes coming. They are kept separate from the examples to
ensure they don't polute the VSCode examples finder.

Adds the Encoder snippets used in the frc-docs Encoder article as the
first instance of this.
2025-04-22 15:26:26 -06:00
Thad House
e2cc9e0059 [hal, wpilib] PWM Rewrite (#7845)
The HAL will only contain the output period and the raw microseconds. Higher level things such as SimDevice can handle everything else.
2025-03-20 19:23:22 -07:00
Thad House
baa20fa239 [hal, wpilib] Rewrite CAN APIs (#7798) 2025-02-25 19:07:01 -08:00
Tyler Veness
ac1705ae2b [wpimath] Remove unit suffixes from variable names (#7529)
* Move units into API docs instead because suffixes make user code verbose and hard to read
* Rename trackWidth to trackwidth
* Make ultrasonic classes use meters instead of a mix of m, cm, mm, ft,
  and inches
2025-02-10 08:23:04 -07:00
Thad House
ad29d45dfb [hal] Remove HAL_GetPort (#7754) 2025-01-30 19:59:34 -07:00
Thad House
48ce2dcc8d [hal, wpilib] Add initial systemcore counter implementation (#7723) 2025-01-28 09:58:34 -07:00
Peter Johnson
eee30c49e2 [wpilib] Remove LiveWindow (#7733)
This will be replaced by a different mechanism, but removing it eases
the initial implementation burden of a new Telemetry/Sendable framework.
2025-01-25 10:52:19 -08:00
Peter Johnson
adbe95e610 [wpilib] Remove Shuffleboard API (#7730) 2025-01-24 23:47:42 -08:00
Thad House
5a6c895b87 [hal, wpilib] Remove built in accelerometer (#7702) 2025-01-17 14:06:09 -08:00
Thad House
1600e773f4 [hal, wpilib] Remove DMA (#7701) 2025-01-17 14:05:34 -08:00
Thad House
f80874dd4b [hal, wpilib] Remove analog accumulator and analog gyro (#7697)
The 2 high level classes were temporarily kept to keep the examples compiling. We will remove those when we have the interface into the built in IMU.
2025-01-17 12:58:31 -08:00
Thad House
92f0a3c961 [hal, wpilib] Remove SPI support (#7678) 2025-01-17 00:22:29 -08:00
Thad House
5017393b3a [hal, wpilib] Remove relay (#7695) 2025-01-16 23:20:07 -08:00
Thad House
58cb395d76 [hal] Add systemcore duty cycle (#7682) 2025-01-15 12:57:31 -07:00
Peter Johnson
2a757eaeb5 Merge branch 'main' into 2027 2024-12-26 18:55:43 -08:00
Tyler Veness
72fdca3507 [examples] Fix C-style cast warning from cpplint (#7591) 2024-12-25 23:33:41 -06:00
Peter Johnson
529bab6ca1 Merge branch 'main' into 2027 2024-12-19 20:40:37 -08:00
sciencewhiz
6fe5da7289 [examples] Fix example json for SimpleDifferentialDriveSimulation (NFC) (#7561)
Uses LTVUnicycleController now instead of RAMSETE.
2024-12-18 09:20:31 -07:00
Tyler Veness
03f0fc4dea [wpimath] Use immutable member functions in ChassisSpeeds (#7545) 2024-12-15 16:09:34 -08:00
Tyler Veness
220f4e1ba4 [wpimath] Remove RamseteController and RamseteCommand (#7522) 2024-12-07 23:38:35 -08:00
Jonah Bonner
ca51197486 [wpilib] Add timestamp getters with configurable time base (#7378) 2024-11-16 07:43:38 -08:00
Kavin Muralikrishnan
1e545c38a8 [romi] Update Romi for parity with XRP (#7389) 2024-11-16 07:24:58 -08:00
Kavin Muralikrishnan
6eb652e10e [xrp] Copy XRPReference docs from Java to C++ (NFC) (#7388) 2024-11-16 07:24:21 -08:00
Kavin Muralikrishnan
280d2c7e32 [examples] Update C++ XRP Code to use SI Units (#7366) 2024-11-08 20:24:13 -08:00