RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
rz::GearRatio Struct Reference

A gear reduction, from the tooth counts as you would read them off the robot. More...

#include <GearRatio.hpp>

Public Member Functions

constexpr double drivenTurnsPerDrivingTurn () const
 Turns of the driven gear per turn of the driving gear.

Public Attributes

double driving = 1
double driven = 1

Detailed Description

A gear reduction, from the tooth counts as you would read them off the robot.

driving is the gear on the shaft that is turned (the motor's or the encoder's side); driven is the gear it turns. Name the fields when constructing it, so the direction is never in doubt:

rz::GearRatio{.driving = 36, .driven = 60}  // the driven shaft turns 0.6 times per turn of the driving one

Member Function Documentation

◆ drivenTurnsPerDrivingTurn()

double rz::GearRatio::drivenTurnsPerDrivingTurn ( ) const
inlinenodiscardconstexpr

Turns of the driven gear per turn of the driving gear.

Member Data Documentation

◆ driven

double rz::GearRatio::driven = 1

◆ driving

double rz::GearRatio::driving = 1

The documentation for this struct was generated from the following file: