Skip to content

Added return value to sendState() #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Joystick/src/Joystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ int Joystick_::buildAndSetSimulationValue(bool includeValue, int16_t value, int1
return buildAndSet16BitValue(includeValue, value, valueMinimum, valueMaximum, JOYSTICK_SIMULATOR_MINIMUM, JOYSTICK_SIMULATOR_MAXIMUM, dataLocation);
}

void Joystick_::sendState()
int Joystick_::sendState()
{
uint8_t data[_hidReportSize];
int index = 0;
Expand Down Expand Up @@ -674,7 +674,7 @@ void Joystick_::sendState()
index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_BRAKE, _brake, _brakeMinimum, _brakeMaximum, &(data[index]));
index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_STEERING, _steering, _steeringMinimum, _steeringMaximum, &(data[index]));

DynamicHID().SendReport(_hidReportId, data, _hidReportSize);
return DynamicHID().SendReport(_hidReportId, data, _hidReportSize);
}

#endif
2 changes: 1 addition & 1 deletion Joystick/src/Joystick.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class Joystick_

void setHatSwitch(int8_t hatSwitch, int16_t value);

void sendState();
int sendState();
};

#endif // !defined(_USING_DYNAMIC_HID)
Expand Down