mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal,wpilib] Move Alert to HAL (#8646)
SystemCore implementation is not yet connected to MRCComm.
This commit is contained in:
@@ -105,6 +105,7 @@ MecanumDrive = "wpi/drive/MecanumDrive.hpp"
|
||||
RobotDriveBase = "wpi/drive/RobotDriveBase.hpp"
|
||||
|
||||
# wpi/driverstation
|
||||
Alert = "wpi/driverstation/Alert.hpp"
|
||||
DriverStation = "wpi/driverstation/DriverStation.hpp"
|
||||
Gamepad = "wpi/driverstation/Gamepad.hpp"
|
||||
GenericHID = "wpi/driverstation/GenericHID.hpp"
|
||||
@@ -228,7 +229,6 @@ Tracer = "wpi/system/Tracer.hpp"
|
||||
Watchdog = "wpi/system/Watchdog.hpp"
|
||||
|
||||
# wpi/util
|
||||
Alert = "wpi/util/Alert.hpp"
|
||||
Preferences = "wpi/util/Preferences.hpp"
|
||||
SensorUtil = "wpi/util/SensorUtil.hpp"
|
||||
|
||||
@@ -243,6 +243,7 @@ yaml_path = "semiwrap/simulation"
|
||||
# wpi/simulation
|
||||
ADXL345Sim = "wpi/simulation/ADXL345Sim.hpp"
|
||||
AddressableLEDSim = "wpi/simulation/AddressableLEDSim.hpp"
|
||||
AlertSim = "wpi/simulation/AlertSim.hpp"
|
||||
AnalogEncoderSim = "wpi/simulation/AnalogEncoderSim.hpp"
|
||||
AnalogInputSim = "wpi/simulation/AnalogInputSim.hpp"
|
||||
BatterySim = "wpi/simulation/BatterySim.hpp"
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
functions:
|
||||
format_as:
|
||||
ignore: true
|
||||
|
||||
classes:
|
||||
wpi::Alert:
|
||||
enums:
|
||||
AlertType:
|
||||
Level:
|
||||
methods:
|
||||
Alert:
|
||||
overloads:
|
||||
std::string_view, AlertType:
|
||||
std::string_view, std::string_view, AlertType:
|
||||
std::string_view, Level:
|
||||
std::string_view, std::string_view, Level:
|
||||
Set:
|
||||
Get:
|
||||
SetText:
|
||||
|
||||
24
wpilibc/src/main/python/semiwrap/simulation/AlertSim.yml
Normal file
24
wpilibc/src/main/python/semiwrap/simulation/AlertSim.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
classes:
|
||||
wpi::sim::AlertSim:
|
||||
methods:
|
||||
GetCount:
|
||||
GetAll:
|
||||
ResetData:
|
||||
wpi::sim::AlertSim::AlertInfo:
|
||||
attributes:
|
||||
handle:
|
||||
group:
|
||||
text:
|
||||
activeStartTime:
|
||||
level:
|
||||
ignore: true
|
||||
methods:
|
||||
isActive:
|
||||
inline_code: |
|
||||
.def_property(
|
||||
"level",
|
||||
[](const AlertInfo& self) { return self.level; },
|
||||
[](AlertInfo& self, wpi::Alert::Level level) { self.level = level; },
|
||||
py::return_value_policy::copy,
|
||||
py::doc("The level of the alert (HIGH, MEDIUM, or LOW).")
|
||||
);
|
||||
@@ -4,6 +4,7 @@ from . import _init__simulation
|
||||
from ._simulation import (
|
||||
ADXL345Sim,
|
||||
AddressableLEDSim,
|
||||
AlertSim,
|
||||
AnalogEncoderSim,
|
||||
AnalogInputSim,
|
||||
BatterySim,
|
||||
|
||||
Reference in New Issue
Block a user