2020-03-03 14:56:50 -08:00
|
|
|
/**
|
|
|
|
* @file dc_motors.h
|
|
|
|
*
|
|
|
|
* @date March 3, 2020
|
|
|
|
* @author Matthew Kennedy (c) 2020
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include "global.h"
|
|
|
|
|
|
|
|
class DcMotor;
|
|
|
|
class Logger;
|
|
|
|
|
2020-05-02 14:54:28 -07:00
|
|
|
DcMotor* initDcMotor(size_t index, bool useTwoWires DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2020-03-03 14:56:50 -08:00
|
|
|
|
|
|
|
// Manual control of motors for use by console commands
|
|
|
|
void setDcMotorFrequency(size_t index, int hz);
|
|
|
|
void setDcMotorDuty(size_t index, float duty);
|
|
|
|
|
2020-05-06 17:06:50 -07:00
|
|
|
void showDcMotorInfo(Logging* logger, int i);
|
2020-05-08 18:39:35 -07:00
|
|
|
|