

def update_sim(self, hal_data, now, tm_diff):
    '\n            Called when the simulation parameters for the program need to be\n            updated.\n            \n            :param now: The current time as a float\n            :param tm_diff: The amount of time that has passed since the last\n                            time that this function was called\n        '
    lr_motor = hal_data['pwm'][1]['value']
    rr_motor = hal_data['pwm'][2]['value']
    lf_motor = hal_data['pwm'][3]['value']
    rf_motor = hal_data['pwm'][4]['value']
    (speed, rotation) = drivetrains.four_motor_drivetrain(lr_motor, rr_motor, lf_motor, rf_motor)
    self.physics_controller.drive(speed, rotation, tm_diff)

dataset/ETHPy150Open robotpy/pyfrc/samples/physics-4wheel/src/physics.py PhysicsEngine.update_sim/original