[手册] Supernova 标准化手册 - 程序

2019-10-23  本文已影响0人  T_K_233
状态:未完成
版本:v0.0.1
最后修改:2019/10/22

注释

/**
 * Example.java
 * 
 * This Class is used to blablabla.
 * @author: The Author
 * @version: v1.0.0
 * @created: 2019/10/22
 * @modified: 2019/10/22 
 */

package frc.robot.subsystems;

import com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX;

/** 
 * This method sets the motor output by coordinate value.
 *
 * @param y: the forward/backward value. positive for moving forward. 
 * @param z: the rotation value. positive for counter-clockwise rotation.
 * @reference: www.google.com
 */
public void drive(double y, double z) {
    motor_left.setValue(y - z);
    motor_right.setValue(y + z);
}
""" example.py

This file is used to blablabla.
"""
__AUTHOR__ = "The Author"
__VERSION__ = "v1.0.0"
__CREATED__ = "2019/10/22"
__MODIFIED__ = "2019/10/22"

import os

def drive(y, z):
    """ This method sets the motor output by coordinate value.

    @param y <double>: the forward/backward value. positive for moving forward. 
    @param z <double>: the rotation value. positive for counter-clockwise rotation.
    @reference: www.google.com
    """
    motor_left.setValue(y - z)
    motor_right.setValue(y + z)
上一篇下一篇

猜你喜欢

热点阅读