mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -103,8 +103,8 @@ class PCMSimModel : public wpi::glass::PneumaticControlModel {
|
||||
CompressorSimModel* GetCompressor() override { return &m_compressor; }
|
||||
|
||||
void ForEachSolenoid(
|
||||
wpi::util::function_ref<void(wpi::glass::SolenoidModel& model, int index)> func)
|
||||
override;
|
||||
wpi::util::function_ref<void(wpi::glass::SolenoidModel& model, int index)>
|
||||
func) override;
|
||||
|
||||
std::string_view GetName() override { return "PCM"; }
|
||||
|
||||
@@ -126,7 +126,8 @@ class PCMsSimModel : public wpi::glass::PneumaticControlsModel {
|
||||
bool Exists() override { return true; }
|
||||
|
||||
void ForEachPneumaticControl(
|
||||
wpi::util::function_ref<void(wpi::glass::PneumaticControlModel& model, int index)>
|
||||
wpi::util::function_ref<void(wpi::glass::PneumaticControlModel& model,
|
||||
int index)>
|
||||
func) override;
|
||||
|
||||
private:
|
||||
@@ -151,7 +152,8 @@ void PCMSimModel::Update() {
|
||||
}
|
||||
|
||||
void PCMSimModel::ForEachSolenoid(
|
||||
wpi::util::function_ref<void(wpi::glass::SolenoidModel& model, int index)> func) {
|
||||
wpi::util::function_ref<void(wpi::glass::SolenoidModel& model, int index)>
|
||||
func) {
|
||||
if (m_solenoidInitCount == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -179,7 +181,8 @@ void PCMsSimModel::Update() {
|
||||
}
|
||||
|
||||
void PCMsSimModel::ForEachPneumaticControl(
|
||||
wpi::util::function_ref<void(wpi::glass::PneumaticControlModel& model, int index)>
|
||||
wpi::util::function_ref<void(wpi::glass::PneumaticControlModel& model,
|
||||
int index)>
|
||||
func) {
|
||||
int32_t numCTREPCMs = m_models.size();
|
||||
for (int32_t i = 0; i < numCTREPCMs; ++i) {
|
||||
@@ -220,7 +223,8 @@ void PCMSimGui::Initialize() {
|
||||
[] { return std::make_unique<PCMsSimModel>(); });
|
||||
|
||||
SimDeviceGui::GetDeviceTree().Add(
|
||||
HALSimGui::halProvider->GetModel("CTREPCMs"), [](wpi::glass::Model* model) {
|
||||
HALSimGui::halProvider->GetModel("CTREPCMs"),
|
||||
[](wpi::glass::Model* model) {
|
||||
wpi::glass::DisplayCompressorsDevice(
|
||||
static_cast<PCMsSimModel*>(model),
|
||||
HALSimGui::halProvider->AreOutputsEnabled());
|
||||
|
||||
Reference in New Issue
Block a user