Set buffer size to 64 bytes for simnet pedals. Send 0 for frequency and amplitude when no effect is playing

This commit is contained in:
Paul Dino Jones
2026-06-11 18:28:21 -04:00
parent 2aee847d7c
commit 0d30170de0
+4 -1
View File
@@ -8,7 +8,7 @@
#include "../../helper/confighelper.h" #include "../../helper/confighelper.h"
#include "../slog/slog.h" #include "../slog/slog.h"
#define SIMNETPEDALS_BUFSIZE 9 #define SIMNETPEDALS_BUFSIZE 64
//Byte[0] : 0x01 (fixed) = Report ID //Byte[0] : 0x01 (fixed) = Report ID
//Byte[1] : 0x00 (fixed) //Byte[1] : 0x00 (fixed)
@@ -39,8 +39,11 @@ int simnetpedals_update(USBGenericHapticDevice* usbhapticdevice, int effecttype,
{ {
motormultiple = 2; motormultiple = 2;
} }
if(play > 0)
{
bytes[3 + (motormultiple * 2)] = usbhapticdevice->frequency; bytes[3 + (motormultiple * 2)] = usbhapticdevice->frequency;
bytes[4 + (motormultiple * 2)] = usbhapticdevice->amplitude; bytes[4 + (motormultiple * 2)] = usbhapticdevice->amplitude;
}
if (usbhapticdevice->handle) if (usbhapticdevice->handle)