From 25a70ca594c3585208ba37a18f6b5437f3cb080f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 Oct 2023 06:44:30 +0000 Subject: [PATCH] Update docs for v1.1.4 (053c24c7598da5724791853732ffd376f8eb79b1) --- docs/_handbrake_joystick_8ino-example.html | 9 +- docs/_handbrake_joystick_8ino_source.html | 8 +- docs/_handbrake_print_8ino-example.html | 9 +- docs/_handbrake_print_8ino_source.html | 8 +- docs/_pedals_joystick_8ino-example.html | 11 +- docs/_pedals_joystick_8ino_source.html | 10 +- docs/_pedals_print_8ino-example.html | 11 +- docs/_pedals_print_8ino_source.html | 10 +- docs/_shift_joystick_8ino-example.html | 13 +-- docs/_shift_joystick_8ino_source.html | 12 +- docs/_shift_print_8ino-example.html | 15 ++- docs/_shift_print_8ino_source.html | 14 +-- docs/_sim_racing_8cpp_source.html | 110 +++++++++--------- docs/_sim_racing_8h.html | 16 ++- docs/_sim_racing_8h_source.html | 108 ++++++++--------- docs/class_sim_racing_1_1_analog_input.html | 41 +++++-- docs/class_sim_racing_1_1_analog_shifter.html | 74 ++++++++---- ...lass_sim_racing_1_1_device_connection.html | 30 +++-- docs/class_sim_racing_1_1_handbrake.html | 35 ++++-- ...1_logitech_driving_force_g_t___pedals.html | 55 ++++++--- .../class_sim_racing_1_1_logitech_pedals.html | 55 ++++++--- ...class_sim_racing_1_1_logitech_shifter.html | 74 ++++++++---- docs/class_sim_racing_1_1_pedals.html | 51 +++++--- docs/class_sim_racing_1_1_peripheral.html | 11 +- docs/class_sim_racing_1_1_shifter.html | 51 +++++--- docs/class_sim_racing_1_1_three_pedals.html | 55 ++++++--- docs/class_sim_racing_1_1_two_pedals.html | 55 ++++++--- 27 files changed, 598 insertions(+), 353 deletions(-) diff --git a/docs/_handbrake_joystick_8ino-example.html b/docs/_handbrake_joystick_8ino-example.html index e757ee3..1098d88 100644 --- a/docs/_handbrake_joystick_8ino-example.html +++ b/docs/_handbrake_joystick_8ino-example.html @@ -102,7 +102,6 @@

Emulates the handbrake as a joystick over USB.

-

Emulates the handbrake as a joystick over USB.

/*
* Project Sim Racing Library for Arduino
* @author David Madison
@@ -175,10 +174,10 @@
}
Header file for the Sim Racing Library.
Interface with analog handbrakes that use hall effect sensors.
Definition SimRacing.h:676
-
virtual void begin()
-
long getPosition(long rMin=0, long rMax=100) const
-
bool positionChanged() const
Definition SimRacing.h:724
-
virtual bool update()
+
virtual void begin()
Initializes the pin for reading from the handbrake.
+
long getPosition(long rMin=0, long rMax=100) const
Retrieves the buffered position for the handbrake axis, rescaled to a nominal range using the calibra...
+
bool positionChanged() const
Checks whether the handbrake's position has changed since the last update.
Definition SimRacing.h:724
+
virtual bool update()
Polls the handbrake to update its position.
diff --git a/docs/_handbrake_joystick_8ino_source.html b/docs/_handbrake_joystick_8ino_source.html index 7e4f651..f9ebded 100644 --- a/docs/_handbrake_joystick_8ino_source.html +++ b/docs/_handbrake_joystick_8ino_source.html @@ -178,10 +178,10 @@
75}
Header file for the Sim Racing Library.
Interface with analog handbrakes that use hall effect sensors.
Definition SimRacing.h:676
-
virtual void begin()
-
long getPosition(long rMin=0, long rMax=100) const
-
bool positionChanged() const
Definition SimRacing.h:724
-
virtual bool update()
+
virtual void begin()
Initializes the pin for reading from the handbrake.
+
long getPosition(long rMin=0, long rMax=100) const
Retrieves the buffered position for the handbrake axis, rescaled to a nominal range using the calibra...
+
bool positionChanged() const
Checks whether the handbrake's position has changed since the last update.
Definition SimRacing.h:724
+
virtual bool update()
Polls the handbrake to update its position.
diff --git a/docs/_handbrake_print_8ino-example.html b/docs/_handbrake_print_8ino-example.html index 0556792..53ae038 100644 --- a/docs/_handbrake_print_8ino-example.html +++ b/docs/_handbrake_print_8ino-example.html @@ -102,7 +102,6 @@

Prints handbrake position percentage over Serial.

-

Prints handbrake position percentage over Serial.

/*
* Project Sim Racing Library for Arduino
* @author David Madison
@@ -163,10 +162,10 @@
}
Header file for the Sim Racing Library.
Interface with analog handbrakes that use hall effect sensors.
Definition SimRacing.h:676
-
virtual void begin()
-
long getPosition(long rMin=0, long rMax=100) const
-
virtual bool update()
-
void serialCalibration(Stream &iface=Serial)
+
virtual void begin()
Initializes the pin for reading from the handbrake.
+
long getPosition(long rMin=0, long rMax=100) const
Retrieves the buffered position for the handbrake axis, rescaled to a nominal range using the calibra...
+
virtual bool update()
Polls the handbrake to update its position.
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
diff --git a/docs/_handbrake_print_8ino_source.html b/docs/_handbrake_print_8ino_source.html index 22d8014..715f92d 100644 --- a/docs/_handbrake_print_8ino_source.html +++ b/docs/_handbrake_print_8ino_source.html @@ -166,10 +166,10 @@
63}
Header file for the Sim Racing Library.
Interface with analog handbrakes that use hall effect sensors.
Definition SimRacing.h:676
-
virtual void begin()
-
long getPosition(long rMin=0, long rMax=100) const
-
virtual bool update()
-
void serialCalibration(Stream &iface=Serial)
+
virtual void begin()
Initializes the pin for reading from the handbrake.
+
long getPosition(long rMin=0, long rMax=100) const
Retrieves the buffered position for the handbrake axis, rescaled to a nominal range using the calibra...
+
virtual bool update()
Polls the handbrake to update its position.
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
diff --git a/docs/_pedals_joystick_8ino-example.html b/docs/_pedals_joystick_8ino-example.html index 520c9df..4e1cce3 100644 --- a/docs/_pedals_joystick_8ino-example.html +++ b/docs/_pedals_joystick_8ino-example.html @@ -102,7 +102,6 @@

Emulates the pedals as a joystick over USB.

-

Emulates the pedals as a joystick over USB.

/*
* Project Sim Racing Library for Arduino
* @author David Madison
@@ -195,11 +194,11 @@
}
Header file for the Sim Racing Library.
Interface with the Logitech pedals (Gas, Brake, and Clutch)
Definition SimRacing.h:748
-
bool hasPedal(PedalID pedal) const
-
bool positionChanged() const
Definition SimRacing.h:339
-
virtual bool update()
-
virtual void begin()
-
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
+
bool hasPedal(PedalID pedal) const
Checks if a given pedal is present in the class.
+
bool positionChanged() const
Checks whether the current pedal positions have changed since the last update.
Definition SimRacing.h:339
+
virtual bool update()
Perform a poll of the hardware to refresh the class state.
+
virtual void begin()
Initialize the hardware (if necessary)
+
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
Retrieves the buffered position for the pedal, rescaled to a nominal range using the calibration valu...
diff --git a/docs/_pedals_joystick_8ino_source.html b/docs/_pedals_joystick_8ino_source.html index c9bdd87..fa93080 100644 --- a/docs/_pedals_joystick_8ino_source.html +++ b/docs/_pedals_joystick_8ino_source.html @@ -198,11 +198,11 @@
95}
Header file for the Sim Racing Library.
Interface with the Logitech pedals (Gas, Brake, and Clutch)
Definition SimRacing.h:748
-
bool hasPedal(PedalID pedal) const
-
bool positionChanged() const
Definition SimRacing.h:339
-
virtual bool update()
-
virtual void begin()
-
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
+
bool hasPedal(PedalID pedal) const
Checks if a given pedal is present in the class.
+
bool positionChanged() const
Checks whether the current pedal positions have changed since the last update.
Definition SimRacing.h:339
+
virtual bool update()
Perform a poll of the hardware to refresh the class state.
+
virtual void begin()
Initialize the hardware (if necessary)
+
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
Retrieves the buffered position for the pedal, rescaled to a nominal range using the calibration valu...
diff --git a/docs/_pedals_print_8ino-example.html b/docs/_pedals_print_8ino-example.html index 673d654..6785c28 100644 --- a/docs/_pedals_print_8ino-example.html +++ b/docs/_pedals_print_8ino-example.html @@ -102,7 +102,6 @@

Prints pedal position percentages over Serial.

-

Prints pedal position percentages over Serial.

/*
* Project Sim Racing Library for Arduino
* @author David Madison
@@ -183,11 +182,11 @@
}
Header file for the Sim Racing Library.
Interface with the Logitech pedals (Gas, Brake, and Clutch)
Definition SimRacing.h:748
-
void serialCalibration(Stream &iface=Serial)
-
bool hasPedal(PedalID pedal) const
-
virtual bool update()
-
virtual void begin()
-
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
bool hasPedal(PedalID pedal) const
Checks if a given pedal is present in the class.
+
virtual bool update()
Perform a poll of the hardware to refresh the class state.
+
virtual void begin()
Initialize the hardware (if necessary)
+
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
Retrieves the buffered position for the pedal, rescaled to a nominal range using the calibration valu...
diff --git a/docs/_pedals_print_8ino_source.html b/docs/_pedals_print_8ino_source.html index 0177fad..2f4e670 100644 --- a/docs/_pedals_print_8ino_source.html +++ b/docs/_pedals_print_8ino_source.html @@ -186,11 +186,11 @@
83}
Header file for the Sim Racing Library.
Interface with the Logitech pedals (Gas, Brake, and Clutch)
Definition SimRacing.h:748
-
void serialCalibration(Stream &iface=Serial)
-
bool hasPedal(PedalID pedal) const
-
virtual bool update()
-
virtual void begin()
-
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
bool hasPedal(PedalID pedal) const
Checks if a given pedal is present in the class.
+
virtual bool update()
Perform a poll of the hardware to refresh the class state.
+
virtual void begin()
Initialize the hardware (if necessary)
+
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
Retrieves the buffered position for the pedal, rescaled to a nominal range using the calibration valu...
diff --git a/docs/_shift_joystick_8ino-example.html b/docs/_shift_joystick_8ino-example.html index ccaca5b..bbf5463 100644 --- a/docs/_shift_joystick_8ino-example.html +++ b/docs/_shift_joystick_8ino-example.html @@ -102,7 +102,6 @@

Emulates the shifter as a joystick over USB.

-

Emulates the shifter as a joystick over USB.

/*
* Project Sim Racing Library for Arduino
* @author David Madison
@@ -211,13 +210,13 @@
Joystick.sendState();
}
Header file for the Sim Racing Library.
-
bool getReverseButton() const
- - -
long getPosition(Axis ax, long rMin=AnalogInput::Min, long rMax=AnalogInput::Max) const
+
bool getReverseButton() const
Checks the current state of the "reverse" button at the bottom of the shift column.
+
virtual bool update()
Polls the hardware to update the current gear state.
+
virtual void begin()
Initializes the hardware pins for reading the gear states.
+
long getPosition(Axis ax, long rMin=AnalogInput::Min, long rMax=AnalogInput::Max) const
Retrieves the buffered position for the analog axis, rescaled to a nominal range using the calibratio...
Interface with the Logitech Driving Force shifter.
Definition SimRacing.h:775
-
int8_t getGear() const
Definition SimRacing.h:463
-
bool gearChanged() const
Definition SimRacing.h:507
+
int8_t getGear() const
Returns the currently selected gear.
Definition SimRacing.h:463
+
bool gearChanged() const
Checks whether the current gear has changed since the last update.
Definition SimRacing.h:507
diff --git a/docs/_shift_joystick_8ino_source.html b/docs/_shift_joystick_8ino_source.html index 25d4a7a..d9bd622 100644 --- a/docs/_shift_joystick_8ino_source.html +++ b/docs/_shift_joystick_8ino_source.html @@ -214,13 +214,13 @@
111 Joystick.sendState();
112}
Header file for the Sim Racing Library.
-
bool getReverseButton() const
-
virtual bool update()
-
virtual void begin()
-
long getPosition(Axis ax, long rMin=AnalogInput::Min, long rMax=AnalogInput::Max) const
+
bool getReverseButton() const
Checks the current state of the "reverse" button at the bottom of the shift column.
+
virtual bool update()
Polls the hardware to update the current gear state.
+
virtual void begin()
Initializes the hardware pins for reading the gear states.
+
long getPosition(Axis ax, long rMin=AnalogInput::Min, long rMax=AnalogInput::Max) const
Retrieves the buffered position for the analog axis, rescaled to a nominal range using the calibratio...
Interface with the Logitech Driving Force shifter.
Definition SimRacing.h:775
-
int8_t getGear() const
Definition SimRacing.h:463
-
bool gearChanged() const
Definition SimRacing.h:507
+
int8_t getGear() const
Returns the currently selected gear.
Definition SimRacing.h:463
+
bool gearChanged() const
Checks whether the current gear has changed since the last update.
Definition SimRacing.h:507
diff --git a/docs/_shift_print_8ino-example.html b/docs/_shift_print_8ino-example.html index 692f197..fd2b4ad 100644 --- a/docs/_shift_print_8ino-example.html +++ b/docs/_shift_print_8ino-example.html @@ -102,7 +102,6 @@

Reads and prints the current gear over serial.

-

Reads and prints the current gear over serial.

/*
* Project Sim Racing Library for Arduino
* @author David Madison
@@ -185,14 +184,14 @@
}
}
Header file for the Sim Racing Library.
-
void serialCalibration(Stream &iface=Serial)
-
int getPositionRaw(Axis ax) const
- - +
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
int getPositionRaw(Axis ax) const
Retrieves the buffered position for the analog axis.
+
virtual bool update()
Polls the hardware to update the current gear state.
+
virtual void begin()
Initializes the hardware pins for reading the gear states.
Interface with the Logitech Driving Force shifter.
Definition SimRacing.h:775
-
int8_t getGear() const
Definition SimRacing.h:463
-
static String getGearString(int gear)
-
bool gearChanged() const
Definition SimRacing.h:507
+
int8_t getGear() const
Returns the currently selected gear.
Definition SimRacing.h:463
+
static String getGearString(int gear)
Returns a String that represents the given gear.
+
bool gearChanged() const
Checks whether the current gear has changed since the last update.
Definition SimRacing.h:507
diff --git a/docs/_shift_print_8ino_source.html b/docs/_shift_print_8ino_source.html index 8210dd1..f12ad76 100644 --- a/docs/_shift_print_8ino_source.html +++ b/docs/_shift_print_8ino_source.html @@ -188,14 +188,14 @@
85 }
86}
Header file for the Sim Racing Library.
-
void serialCalibration(Stream &iface=Serial)
-
int getPositionRaw(Axis ax) const
-
virtual bool update()
-
virtual void begin()
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
int getPositionRaw(Axis ax) const
Retrieves the buffered position for the analog axis.
+
virtual bool update()
Polls the hardware to update the current gear state.
+
virtual void begin()
Initializes the hardware pins for reading the gear states.
Interface with the Logitech Driving Force shifter.
Definition SimRacing.h:775
-
int8_t getGear() const
Definition SimRacing.h:463
-
static String getGearString(int gear)
-
bool gearChanged() const
Definition SimRacing.h:507
+
int8_t getGear() const
Returns the currently selected gear.
Definition SimRacing.h:463
+
static String getGearString(int gear)
Returns a String that represents the given gear.
+
bool gearChanged() const
Checks whether the current gear has changed since the last update.
Definition SimRacing.h:507
diff --git a/docs/_sim_racing_8cpp_source.html b/docs/_sim_racing_8cpp_source.html index fc0bb80..216706b 100644 --- a/docs/_sim_racing_8cpp_source.html +++ b/docs/_sim_racing_8cpp_source.html @@ -1234,75 +1234,75 @@
1091
1092}; // end SimRacing namespace
Header file for the Sim Racing Library.
-
Axis
Definition SimRacing.h:37
+
Axis
Enumeration for analog axis names, mapped to integers.
Definition SimRacing.h:37
Handle I/O for analog (ADC) inputs.
Definition SimRacing.h:124
-
void setInverted(bool invert=true)
-
bool isInverted() const
-
long getPosition(long rMin=Min, long rMax=Max) const
-
int getPositionRaw() const
+
void setInverted(bool invert=true)
Set the 'inverted' state of the axis.
+
bool isInverted() const
Check whether the axis is inverted or not.
+
long getPosition(long rMin=Min, long rMax=Max) const
Retrieves the buffered position for the analog axis, rescaled to a nominal range using the calibratio...
+
int getPositionRaw() const
Retrieves the buffered position for the analog axis.
static const int Max
Maximum value of the analog to digital (ADC) converter. 10-bit by default.
Definition SimRacing.h:127
-
int getMax() const
Definition SimRacing.h:176
-
AnalogInput(uint8_t p)
-
void setCalibration(Calibration newCal)
-
virtual bool read()
-
int getMin() const
Definition SimRacing.h:169
-
void setPosition(int newPos)
+
int getMax() const
Retrieves the calibrated maximum position.
Definition SimRacing.h:176
+
AnalogInput(uint8_t p)
Class constructor.
+
void setCalibration(Calibration newCal)
Calibrate the axis' min/max values for rescaling.
+
virtual bool read()
Updates the current value of the axis by polling the ADC.
+
int getMin() const
Retrieves the calibrated minimum position.
Definition SimRacing.h:169
+
void setPosition(int newPos)
Override the current position with a custom value.
static const int Min
Minimum value of the analog to digital (ADC) converter.
Definition SimRacing.h:126
Interface with shifters using two potentiometers for gear position.
Definition SimRacing.h:535
-
void setCalibration(GearPosition neutral, GearPosition g1, GearPosition g2, GearPosition g3, GearPosition g4, GearPosition g5, GearPosition g6, float engagePoint=CalEngagementPoint, float releasePoint=CalReleasePoint, float edgeOffset=CalEdgeOffset)
-
void serialCalibration(Stream &iface=Serial)
-
bool getReverseButton() const
-
AnalogShifter(uint8_t pinX, uint8_t pinY, uint8_t pinRev=NOT_A_PIN, uint8_t detectPin=NOT_A_PIN)
-
int getPositionRaw(Axis ax) const
-
virtual bool update()
-
bool isConnected() const
Definition SimRacing.h:629
-
virtual void begin()
-
long getPosition(Axis ax, long rMin=AnalogInput::Min, long rMax=AnalogInput::Max) const
-
void poll()
-
void setStablePeriod(unsigned long t)
-
DeviceConnection(uint8_t pin, bool invert=false, unsigned long detectTime=250)
-
ConnectionState getState() const
-
ConnectionState
Definition SimRacing.h:56
+
void setCalibration(GearPosition neutral, GearPosition g1, GearPosition g2, GearPosition g3, GearPosition g4, GearPosition g5, GearPosition g6, float engagePoint=CalEngagementPoint, float releasePoint=CalReleasePoint, float edgeOffset=CalEdgeOffset)
Calibrate the gear shifter for more accurate shifting.
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
bool getReverseButton() const
Checks the current state of the "reverse" button at the bottom of the shift column.
+
AnalogShifter(uint8_t pinX, uint8_t pinY, uint8_t pinRev=NOT_A_PIN, uint8_t detectPin=NOT_A_PIN)
Class constructor.
+
int getPositionRaw(Axis ax) const
Retrieves the buffered position for the analog axis.
+
virtual bool update()
Polls the hardware to update the current gear state.
+
bool isConnected() const
Check if the device is physically connected to the board.
Definition SimRacing.h:629
+
virtual void begin()
Initializes the hardware pins for reading the gear states.
+
long getPosition(Axis ax, long rMin=AnalogInput::Min, long rMax=AnalogInput::Max) const
Retrieves the buffered position for the analog axis, rescaled to a nominal range using the calibratio...
+
void poll()
Checks if the pin detects a connection.
+
void setStablePeriod(unsigned long t)
Allows the user to change the stable period of the detector.
+
DeviceConnection(uint8_t pin, bool invert=false, unsigned long detectTime=250)
Class constructor.
+
ConnectionState getState() const
Retrieves the current ConnectionState from the instance.
+
ConnectionState
The state of the connection, whether it is connected, disconnected, and everywhere in-between.
Definition SimRacing.h:56
@ Unplug
Device was just removed (connection ends)
Definition SimRacing.h:60
@ PlugIn
Device was just plugged in (connection starts), unstable.
Definition SimRacing.h:58
@ Disconnected
No connection present.
Definition SimRacing.h:57
@ Connected
Connection present and stable.
Definition SimRacing.h:59
-
bool isConnected() const
-
virtual void begin()
-
long getPosition(long rMin=0, long rMax=100) const
-
void setCalibration(AnalogInput::Calibration newCal)
-
Handbrake(uint8_t pinAx, uint8_t detectPin=NOT_A_PIN)
-
int getPositionRaw() const
-
virtual bool update()
-
bool isConnected() const
Definition SimRacing.h:733
-
void serialCalibration(Stream &iface=Serial)
-
LogitechDrivingForceGT_Pedals(uint8_t gasPin, uint8_t brakePin, uint8_t detectPin=NOT_A_PIN)
-
LogitechPedals(uint8_t gasPin, uint8_t brakePin, uint8_t clutchPin, uint8_t detectPin=NOT_A_PIN)
-
LogitechShifter(uint8_t pinX, uint8_t pinY, uint8_t pinRev=NOT_A_PIN, uint8_t detectPin=NOT_A_PIN)
+
bool isConnected() const
Check if the device is physically connected to the board.
+
virtual void begin()
Initializes the pin for reading from the handbrake.
+
long getPosition(long rMin=0, long rMax=100) const
Retrieves the buffered position for the handbrake axis, rescaled to a nominal range using the calibra...
+
void setCalibration(AnalogInput::Calibration newCal)
Calibrate the axis' min/max values for rescaling.
+
Handbrake(uint8_t pinAx, uint8_t detectPin=NOT_A_PIN)
Class constructor.
+
int getPositionRaw() const
Retrieves the buffered position for the handbrake, ignoring the calibration data.
+
virtual bool update()
Polls the handbrake to update its position.
+
bool isConnected() const
Check if the device is physically connected to the board.
Definition SimRacing.h:733
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
LogitechDrivingForceGT_Pedals(uint8_t gasPin, uint8_t brakePin, uint8_t detectPin=NOT_A_PIN)
Class constructor.
+
LogitechPedals(uint8_t gasPin, uint8_t brakePin, uint8_t clutchPin, uint8_t detectPin=NOT_A_PIN)
Class constructor.
+
LogitechShifter(uint8_t pinX, uint8_t pinY, uint8_t pinRev=NOT_A_PIN, uint8_t detectPin=NOT_A_PIN)
Class constructor.
Base class for all pedals instances.
Definition SimRacing.h:276
-
void serialCalibration(Stream &iface=Serial)
-
void setCalibration(PedalID pedal, AnalogInput::Calibration cal)
-
Pedals(AnalogInput *dataPtr, uint8_t nPedals, uint8_t detectPin)
-
static String getPedalName(PedalID pedal)
-
bool hasPedal(PedalID pedal) const
-
int getPositionRaw(PedalID pedal) const
-
virtual bool update()
-
virtual void begin()
-
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
-
int getNumPedals() const
Definition SimRacing.h:332
+
void serialCalibration(Stream &iface=Serial)
Runs an interactive calibration tool using the serial interface.
+
void setCalibration(PedalID pedal, AnalogInput::Calibration cal)
Calibrate a pedal's min/max values for rescaling.
+
Pedals(AnalogInput *dataPtr, uint8_t nPedals, uint8_t detectPin)
Class constructor.
+
static String getPedalName(PedalID pedal)
Utility function to get the string name for each pedal.
+
bool hasPedal(PedalID pedal) const
Checks if a given pedal is present in the class.
+
int getPositionRaw(PedalID pedal) const
Retrieves the buffered position for the pedal, ignoring the calibration data.
+
virtual bool update()
Perform a poll of the hardware to refresh the class state.
+
virtual void begin()
Initialize the hardware (if necessary)
+
long getPosition(PedalID pedal, long rMin=0, long rMax=100) const
Retrieves the buffered position for the pedal, rescaled to a nominal range using the calibration valu...
+
int getNumPedals() const
Retrieves the number of pedals handled by the class.
Definition SimRacing.h:332
Base class for all shifter instances.
Definition SimRacing.h:445
-
String getGearString() const
-
int8_t getGear() const
Definition SimRacing.h:463
-
Shifter(int8_t min, int8_t max)
-
char getGearChar() const
+
String getGearString() const
Returns a String that represents the current gear.
+
int8_t getGear() const
Returns the currently selected gear.
Definition SimRacing.h:463
+
Shifter(int8_t min, int8_t max)
Class constructor.
+
char getGearChar() const
Returns a character that represents the current gear.
bool changed
whether the gear has changed since the previous update
Definition SimRacing.h:528
int8_t currentGear
index of the current gear
Definition SimRacing.h:527
Pedal implementation for devices with gas, brake, and clutch.
Definition SimRacing.h:407
-
ThreePedals(uint8_t gasPin, uint8_t brakePin, uint8_t clutchPin, uint8_t detectPin=NOT_A_PIN)
-
void setCalibration(AnalogInput::Calibration gasCal, AnalogInput::Calibration brakeCal, AnalogInput::Calibration clutchCal)
+
ThreePedals(uint8_t gasPin, uint8_t brakePin, uint8_t clutchPin, uint8_t detectPin=NOT_A_PIN)
Class constructor.
+
void setCalibration(AnalogInput::Calibration gasCal, AnalogInput::Calibration brakeCal, AnalogInput::Calibration clutchCal)
Sets the calibration data (min/max) for the pedals.
Pedal implementation for devices with only gas and brake.
Definition SimRacing.h:379
-
void setCalibration(AnalogInput::Calibration gasCal, AnalogInput::Calibration brakeCal)
-
TwoPedals(uint8_t gasPin, uint8_t brakePin, uint8_t detectPin=NOT_A_PIN)
+
void setCalibration(AnalogInput::Calibration gasCal, AnalogInput::Calibration brakeCal)
Sets the calibration data (min/max) for the pedals.
+
TwoPedals(uint8_t gasPin, uint8_t brakePin, uint8_t detectPin=NOT_A_PIN)
Class constructor.
Pedal
Pedal ID names.
Definition SimRacing.h:265
Simple struct containing min/max values for axis calibration.
Definition SimRacing.h:215
int max
Maximum value of the analog axis.
Definition SimRacing.h:217
diff --git a/docs/_sim_racing_8h.html b/docs/_sim_racing_8h.html index 4bee27e..11f8ecc 100644 --- a/docs/_sim_racing_8h.html +++ b/docs/_sim_racing_8h.html @@ -160,8 +160,10 @@

Macros

#define SHIFTER_SHIELD_V1_PINS   A1, A0, 14, A2 + Pin definitions for the Parts Not Included Logitech Shifter Shield, designed for the SparkFun Pro Micro:
  #define PEDAL_SHIELD_V1_PINS   A2, A1, A0, 10 + Pin definitions for the Parts Not Included Logitech Pedals Shield, designed for the SparkFun Pro Micro:
  +

@@ -169,6 +171,7 @@

enum  SimRacing::Axis : uint8_t { SimRacing::X = 0 , SimRacing::Y = 1 }
 Enumeration for analog axis names, mapped to integers. More...
 
enum  SimRacing::Pedal {
  Gas = 0 @@ -198,7 +201,8 @@

-

Pin definitions for the Parts Not Included Logitech Pedals Shield, designed for the SparkFun Pro Micro:

+ +

Pin definitions for the Parts Not Included Logitech Pedals Shield, designed for the SparkFun Pro Micro: