Skip to content

Adding Simagic P1000 Pedals Support #14

@Mon-Ouie

Description

@Mon-Ouie

Hey,

I'm looking into how to add support for the haptics feedback of the Simagic Pedals. I think I've figured out most of what's needed about the pedals themselves, just need to know how to make it fit with the rest of monocoque.

They have a vendor id 0x0483, product id 0x0525. The official SimPro manager application sends 4 HID SET_REPORT requests. Each payload has a size of 49 bytes, but most of it is just zeroes. First it always sends this exact message (never seen it change, not sure what it means):

0xF1 0x17 0x00 0x00 0x00 0x01 0x02

then for each pedal:

0xEC [pedal_id] [enabled] [frequency] [strength]

where:

  • pedal_id is 0 for the clutch, 1 for the brakes, and 2 for the throttle.
  • enabled is 1 if the haptics module should be turned on, 0 otherwise.
  • frequency is the vibration frequency in Hertz. The GUI lets you select a frequency between 10 (0x0A) and 50 (0x32).
  • strength is how strong the vibrations are, between 0 and 100.

I can trigger them programmatically using hidapi, e.g. with the Python script below:

import hid
from time import sleep

SIMAGIC_VENDOR_ID = 0x0483
SIMAGIC_PRODUCT_ID_P1000 = 0x0525

def zero_pad_buffer(buf, target=49):
    return buf + [0] * (target - len(buf))

def set_haptic_feedback(
        device,
        clutch_vibrating=False, clutch_frequency=10, clutch_strength=0,
        brake_vibrating=False, brake_frequency=10, brake_strength=0,
        throttle_vibrating=False, throttle_frequency=10, throttle_strength=0):
    device.send_feature_report(zero_pad_buffer([
        241, 0xF1, 0x17, 0x00, 0x00, 0x00, 0x01, 0x02
    ]))

    device.send_feature_report(zero_pad_buffer([
        241, 0xEC, 0x00, int(clutch_vibrating), clutch_frequency, clutch_strength
    ]))

    device.send_feature_report(zero_pad_buffer([
        241, 0xEC, 0x01, int(brake_vibrating), brake_frequency, brake_strength
    ]))

    device.send_feature_report(zero_pad_buffer([
        241, 0xEC, 0x02, int(throttle_vibrating), throttle_frequency, throttle_strength
    ]))

device = hid.device()

device.open(SIMAGIC_VENDOR_ID, SIMAGIC_PRODUCT_ID_P1000)

print("clutch")
set_haptic_feedback(device, clutch_vibrating=True, clutch_strength=50, clutch_frequency=50)

sleep(1)

print("brake")
set_haptic_feedback(device, brake_vibrating=True, brake_strength=100, brake_frequency=20)

sleep(1)

print("throttle")
set_haptic_feedback(device, throttle_vibrating=True, throttle_strength=25, throttle_frequency=10)

sleep(1)

print("clutch + brake")
set_haptic_feedback(device,
                    clutch_vibrating=True, clutch_strength=50, clutch_frequency=10,
                    brake_vibrating=True, brake_strength=50, brake_frequency=50)
sleep(1)

print("off")
set_haptic_feedback(device)

device.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions