Potentially incorrect value in DS5_CONSTANTS #45

Closed
opened 2026-02-10 18:44:09 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @raingart on GitHub (Jun 16, 2025).

Under ReFactor, I put the variables into a separate object and found duplication. Perhaps all OK but there is a probability of errors
Why do I believe that a mistake? Based on the fact that DS4 does not have such a duplication

I found a match, maybe the meaning is wrong

const DS5_CONSTANTS = {
      INFO: 0x20,
      RESET: 0x80,
      
      CALIBRATION_CMD: 0x82,
      CALIBRATION_RESP: 0x83,

      BDADDR_REQUEST: 0x80, // Coincides with RESET и NV_REQUEST
      BDADDR_RESPONSE: 0x81, // Coincides with NV_STATUS_RESPONSE
      NV_REQUEST: 0x80,      // Coincides with RESET и BDADDR_REQUEST
      NV_STATUS_RESPONSE: 0x81, // Coincides with BDADDR_RESPONSE
      NV_CONFIRMATION: 0x83,   // Coincides with CALIBRATION_RESP

Unfortunately I can't provide my refactor because it is very different and inoperative because it is in the process of being written, but I hope the example is clear, if not I can provide details

UPD: I just replaced one of the parameters (NV_CONFIRMATION). I'm using a much older version of the script because the refactor took a long time. But it's still worth checking.

Image
Image

Originally created by @raingart on GitHub (Jun 16, 2025). Under ReFactor, I put the variables into a separate object and found duplication. Perhaps all OK but there is a probability of errors Why do I believe that a mistake? Based on the fact that DS4 does not have such a duplication ​ I found a match, maybe the meaning is wrong ``` const DS5_CONSTANTS = { INFO: 0x20, RESET: 0x80, CALIBRATION_CMD: 0x82, CALIBRATION_RESP: 0x83, BDADDR_REQUEST: 0x80, // Coincides with RESET и NV_REQUEST BDADDR_RESPONSE: 0x81, // Coincides with NV_STATUS_RESPONSE NV_REQUEST: 0x80, // Coincides with RESET и BDADDR_REQUEST NV_STATUS_RESPONSE: 0x81, // Coincides with BDADDR_RESPONSE NV_CONFIRMATION: 0x83, // Coincides with CALIBRATION_RESP ``` Unfortunately I can't provide my refactor because it is very different and inoperative because it is in the process of being written, but I hope the example is clear, if not I can provide details UPD: I just replaced one of the parameters (NV_CONFIRMATION). I'm using a much older version of the script because the refactor took a long time. But it's still worth checking. ![Image](https://github.com/user-attachments/assets/f42a9de1-456c-4fe9-9d35-3cb806212bc9) ![Image](https://github.com/user-attachments/assets/7491fe4b-afda-43af-a849-1a2cbcd183b0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dualshock-tools/dualshock-tools.github.io#45