001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenixpro.wpiutils; 008 009import edu.wpi.first.wpilibj.motorcontrol.MotorController; 010import edu.wpi.first.wpilibj.MotorSafety; 011 012/** 013 * implem of MotorSafety interface in WPI. This also allows late/lazy 014 * construction of WPI's motor safety object (which mitigates late-released bugs from WPI). 015 * 016 * @deprecated Classes in the phoenixpro package will be removed in 2024. 017 * Users should instead use classes from the phoenix6 package. 018 */ 019@Deprecated(forRemoval = true) 020public class MotorSafetyImplem extends MotorSafety { 021 private final MotorController _motorController; 022 private final String _description; 023 024 /** 025 * Constructor for WPI_MotorSafetyImplem 026 * @param speedController Motor Controller to implement motor safety on 027 * @param description Description of motor controller 028 * 029 * @deprecated Classes in the phoenixpro package will be removed in 2024. 030 * Users should instead use classes from the phoenix6 package. 031 */ 032 @Deprecated(forRemoval = true) 033 public MotorSafetyImplem(MotorController speedController, String description) { 034 _motorController = speedController; 035 _description = description; 036 } 037 038 /** 039 * Stop the controller 040 */ 041 public void stopMotor() { _motorController.stopMotor(); } 042 043 /** 044 * @return Description of motor controller 045 */ 046 public String getDescription() { return _description; } 047}