mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Fix compilation issues that occur when building with bazel (#6008)
This commit is contained in:
@@ -367,12 +367,12 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
#ifdef _WIN32
|
||||
TIMECAPS tc;
|
||||
if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
|
||||
UINT target = min(1, tc.wPeriodMin);
|
||||
UINT target = (std::min)(static_cast<UINT>(1), tc.wPeriodMin);
|
||||
timeBeginPeriod(target);
|
||||
std::atexit([]() {
|
||||
TIMECAPS tc;
|
||||
if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
|
||||
UINT target = min(1, tc.wPeriodMin);
|
||||
UINT target = (std::min)(static_cast<UINT>(1), tc.wPeriodMin);
|
||||
timeEndPeriod(target);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "NetworkInterface.h"
|
||||
#include "WireConnection.h"
|
||||
#include "WireEncoder.h"
|
||||
#include "net/NetworkOutgoingQueue.h"
|
||||
#include "networktables/NetworkTableValue.h"
|
||||
|
||||
using namespace nt;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
package edu.wpi.first.wpilibj.examples.eventloop;
|
||||
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import edu.wpi.first.wpilibj.examples.encoder.Robot;
|
||||
|
||||
/**
|
||||
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
|
||||
|
||||
@@ -10,7 +10,7 @@ import static edu.wpi.first.wpilibj2.command.Commands.waitUntil;
|
||||
import edu.wpi.first.math.controller.PIDController;
|
||||
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.examples.frisbeebot.Constants.ShooterConstants;
|
||||
import edu.wpi.first.wpilibj.examples.rapidreactcommandbot.Constants.ShooterConstants;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
|
||||
@@ -176,6 +176,7 @@ class MeasureTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("SelfComparison")
|
||||
void testCompare() {
|
||||
var unit = new ExampleUnit(7);
|
||||
var base = unit.of(1);
|
||||
|
||||
Reference in New Issue
Block a user