Skip to content

Conversation

lizlooney
Copy link
Collaborator

Added external_samples/spark_mini.py that wraps the wpilib.SparkMini class.

Changed component class names to be consistent with the external_samples python files.

Updated generated json files.

Added function addInstanceComponentBlocks to mrc_call_python_function.ts to generate component function blocks. Updated function getBlocks in blocks_components.ts to use addInstanceComponentBlocks.

…class.

Changed component class names to be consistent with the external_samples python files.

Updated generated json files.

Added function addInstanceComponentBlocks to mrc_call_python_function.ts to generate component function blocks.
Updated function getBlocks in blocks_components.ts to use addInstanceComponentBlocks.
@lizlooney lizlooney requested a review from alan412 July 1, 2025 03:41
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are events in the external_samples_data.json file?

Most of these are minor, but I think there is a bug in the mrc_call_python_function

@lizlooney
Copy link
Collaborator Author

Are events in the external_samples_data.json file?

external_samples_data.json contains the data for python instance methods. The ones related to events are

  • color_range_sensor.ColorRangeSensor
    • register_when_hue_in_range
    • register_when_less_than_distance
    • register_when_saturation_in_range
  • rev_touch_sensor.RevTouchSensor
    • register_when_pressed
    • register_when_released

@alan412 alan412 self-requested a review July 3, 2025 11:00
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alan412 alan412 merged commit bdcda8d into wpilibsuite:main Jul 3, 2025
1 check passed
@lizlooney lizlooney deleted the pr_spark_mini branch July 3, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants