Skip to content

Commit

Permalink
Merge branch 'main' into one-pin-multiple-buttons-ui-revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelsin committed Apr 17, 2024
2 parents 2e040a4 + d384d8e commit 5f3fa47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ Input latency is tested using the methodology outlined at [WydD's inputlag.scien

| Version | Mode | Poll Rate | Min | Max | Avg | Stdev | % on time | %1f skip | %2f skip |
| ------- | ------------ | --------- | ------- | ------- | ------- | ------- | --------- | -------- | -------- |
| v0.7.7 | Xinput | 1 ms | 0.45 ms | 1.28 ms | 0.76 ms | 0.24 ms | 98.48% | 1.52% | 0% |
| v0.7.7 | Switch | 1 ms | 0.41 ms | 1.22 ms | 0.72 ms | 0.24 ms | 98.54% | 1.46% | 0% |
| v0.7.7 | Dinput (PS3) | 1 ms | 0.44 ms | 1.27 ms | 0.75 ms | 0.24 ms | 98.49% | 1.51% | 0% |
| v0.7.7 | PS4 | 1 ms | 0.55 ms | 2.17 ms | 0.86 ms | 0.24 ms | 98.30% | 1.70% | 0% |
| v0.7.7 | PS4 Hack | 1 ms | 0.55 ms | 1.38 ms | 0.86 ms | 0.24 ms | 98.32% | 1.68% | 0% |
| v0.7.8 | Xinput | 1 ms | 0.45 ms | 1.28 ms | 0.76 ms | 0.24 ms | 98.48% | 1.52% | 0% |
| v0.7.8 | Switch | 1 ms | 0.41 ms | 1.22 ms | 0.72 ms | 0.24 ms | 98.53% | 1.47% | 0% |
| v0.7.8 | Dinput (PS3) | 1 ms | 0.44 ms | 1.27 ms | 0.75 ms | 0.24 ms | 98.49% | 1.51% | 0% |
| v0.7.8 | PS4 | 1 ms | 0.55 ms | 2.37 ms | 0.90 ms | 0.32 ms | 98.20% | 1.80% | 0% |
| v0.7.8 | PS5 | 1 ms | 0.55 ms | 2.24 ms | 0.91 ms | 0.32 ms | 98.18% | 1.82% | 0% |

Full results can be found in the [GP2040-CE v0.7.7 Firmware Latency Test Results](https://github.com/OpenStickCommunity/Site/raw/main/latency_testing/GP2040-CE_Firmware_Latency_Test_Results_v0.7.7.xlsx) .xlsx Sheet.
Full results can be found in the [GP2040-CE v0.7.8 Firmware Latency Test Results](https://github.com/OpenStickCommunity/Site/raw/main/latency_testing/GP2040-CE_Firmware_Latency_Test_Results_v0.7.8.xlsx) .xlsx Sheet.

Results from v0.7.6 can be found [HERE](https://github.com/OpenStickCommunity/Site/raw/main/latency_testing/GP2040-CE_Firmware_Latency_Test_Results_v0.7.6.xlsx). Previous results from v0.7.5 and earlier can be found in the [GP2040-CE v0.7.5 (and before) Firmware Latency Test Results](https://github.com/OpenStickCommunity/Site/raw/main/latency_testing/GP2040-CE_Firmware_Latency_Test_Results_v0.7.5_and_before.xlsx) .xlsx Sheet.
Results from v0.7.7 can be found [HERE](https://github.com/OpenStickCommunity/Site/raw/main/latency_testing/GP2040-CE_Firmware_Latency_Test_Results_v0.7.7.xlsx). Previous results can be found in the `latency_testing` folder [HERE](https://github.com/OpenStickCommunity/Site/tree/main/latency_testing).

## Support

Expand Down
12 changes: 6 additions & 6 deletions src/display/ui/elements/GPLever.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ void GPLever::draw() {

if (this->_inputType == DPAD_MODE_DIGITAL) {
// dpad
bool upState = (this->_upMask > -1 ? getGamepad()->pressedButton((uint16_t)this->_upMask) : getGamepad()->pressedUp());
bool leftState = (this->_leftMask > -1 ? getGamepad()->pressedButton((uint16_t)this->_leftMask) : getGamepad()->pressedLeft());
bool downState = (this->_downMask > -1 ? getGamepad()->pressedButton((uint16_t)this->_downMask) : getGamepad()->pressedDown());
bool rightState = (this->_rightMask > -1 ? getGamepad()->pressedButton((uint16_t)this->_rightMask) : getGamepad()->pressedRight());
bool upState = (this->_upMask > -1 ? getProcessedGamepad()->pressedButton((uint16_t)this->_upMask) : getProcessedGamepad()->pressedUp());
bool leftState = (this->_leftMask > -1 ? getProcessedGamepad()->pressedButton((uint16_t)this->_leftMask) : getProcessedGamepad()->pressedLeft());
bool downState = (this->_downMask > -1 ? getProcessedGamepad()->pressedButton((uint16_t)this->_downMask) : getProcessedGamepad()->pressedDown());
bool rightState = (this->_rightMask > -1 ? getProcessedGamepad()->pressedButton((uint16_t)this->_rightMask) : getProcessedGamepad()->pressedRight());
if (upState) {
leverY -= leverRadius;
if (leftState) {
Expand All @@ -64,8 +64,8 @@ void GPLever::draw() {
}
} else {
// analog
uint16_t analogX = map((this->_inputType == DPAD_MODE_LEFT_ANALOG ? getGamepad()->state.lx : getGamepad()->state.rx), 0, 0xFFFF, 0, 100);
uint16_t analogY = map((this->_inputType == DPAD_MODE_LEFT_ANALOG ? getGamepad()->state.ly : getGamepad()->state.ry), 0, 0xFFFF, 0, 100);
uint16_t analogX = map((this->_inputType == DPAD_MODE_LEFT_ANALOG ? getProcessedGamepad()->state.lx : getProcessedGamepad()->state.rx), 0, 0xFFFF, 0, 100);
uint16_t analogY = map((this->_inputType == DPAD_MODE_LEFT_ANALOG ? getProcessedGamepad()->state.ly : getProcessedGamepad()->state.ry), 0, 0xFFFF, 0, 100);

uint16_t minX = std::max(0,(baseX - baseRadius));
uint16_t maxX = std::min((baseX + baseRadius),128);
Expand Down

0 comments on commit 5f3fa47

Please sign in to comment.