Skip to content

Commit 3dc5548

Browse files
authored
Removed Component base class and external_samples (wpilibsuite#358)
* Modified uploadProject: removed the saveProjectInfo call so that older projects will get upgraded. * Changed upgradeProjectIfNecessary to be synchronous by using await on each upgradeFrom_xxx_to_yyy call. Otherwise the project is upgraded asynchronously and the app fetches the modules before they are upgraded. * Deleted external_samples files and the corresponding json file. * Modified python tools to produce information about components, including whether a class is a component, the component port name (which will show next to the input socket on the mrc_component block), and the component port type (a single string consisting of one or more port types separated by two underscores). Updated generated .json files. Updated typescript code that uses the .json files. * Modified pascalCaseToSnakeCase to work better for wpilib class names such as AddressableLED and PWMSparkMax. Removed snakeCaseToPascalCase, which is not used. * Updated typescript code related to port, component, and mechanism blocks. Added PortType enum and functions to convert from a string to a PortType array and back. Added code to upgrade expansion hub motor and servo components. Added code to upgrade port type strings. * Removed methods opmode_start, opmode_periodic, and opmode_end from Mechansim class. Removed code that generated opmode_start, opmode_periodic, and opmode_end in the Robot. Removed code that generated calls to robot methods opmode_start, opmode_periodic, and opmode_end in an opmode. Added upgrade code that changed the opmode_periodic method def in a Mechanism to be editable and deletable. * Add warnings to mrc_component and mrc_call_python_function blocks if the component class no longer exists. * Put back opmode_start, opmode_periodic, and opmode_end methods. * Changed mrc_port extraState to use an array to store the port types.
1 parent 33d3f6a commit 3dc5548

40 files changed

+857
-3183
lines changed

external_samples/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

external_samples/color_range_sensor.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

external_samples/component.py

Lines changed: 0 additions & 55 deletions
This file was deleted.
-31.4 KB
Binary file not shown.
-48.1 KB
Binary file not shown.
-114 KB
Binary file not shown.
-118 KB
Binary file not shown.
-153 KB
Binary file not shown.
-90.1 KB
Binary file not shown.
-205 KB
Binary file not shown.

0 commit comments

Comments
 (0)