Skip to content

Conversation

@hbradio
Copy link
Contributor

@hbradio hbradio commented Jun 14, 2021

I started to record a lesson using the distance sensor and realize the block was always returning undefined. This fixes the error and improves the test that should have caught it.

@hbradio hbradio requested a review from cabarnes June 14, 2021 03:34
sensor.leftLightSensorReading, sensor.rightLightSensorReading,
sensor.leftLineSensorReading, sensor.rightLineSensorReading);
sensor.leftLineSensorReading, sensor.rightLineSensorReading,
sensor.distanceSensorReading);
Copy link
Member

Choose a reason for hiding this comment

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

It may make sense at this point to just pass in sensor and have the function use destructuring on the object

Copy link
Contributor Author

@hbradio hbradio Jun 14, 2021

Choose a reason for hiding this comment

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

Done. We should also refactor the names of the button state variables, but I'll leave that for a separate PR since it spans up through the sensor reducer.

@hbradio hbradio requested a review from cabarnes June 14, 2021 13:46
@hbradio hbradio merged commit 6496a2f into alpha Jun 14, 2021
@hbradio hbradio deleted the fix-distance-block branch June 14, 2021 14:35
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.

3 participants