Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): Add toggle to turn on/off robot rail lights #1710

Merged
merged 1 commit into from
Jun 18, 2018

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jun 15, 2018

overview

This PR wires the lights toggle UI from #1708 to the /robot/lights endpoint from #1709 so that the user can turn their robot's lights on and off.

Closes #1684

changelog

  • feat(app): Add toggle to turn on/off robot rail light

review requests

Try it out with a robot! Does not work with Virtual Smoothie. Sunset is up to date with the necessary endpoints

@mcous mcous added feature Ticket is a feature request / PR introduces a feature app Affects the `app` project ready for review labels Jun 15, 2018
@codecov
Copy link

codecov bot commented Jun 15, 2018

Codecov Report

Merging #1710 into edge will increase coverage by 0.12%.
The diff coverage is 64.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #1710      +/-   ##
==========================================
+ Coverage   34.85%   34.97%   +0.12%     
==========================================
  Files         340      340              
  Lines        5563     5589      +26     
==========================================
+ Hits         1939     1955      +16     
- Misses       3624     3634      +10
Impacted Files Coverage Δ
app/src/http-api-client/index.js 100% <ø> (ø) ⬆️
components/src/structure/RefreshCard.js 100% <ø> (ø) ⬆️
app/src/components/RobotSettings/ControlsCard.js 0% <0%> (ø) ⬆️
app/src/http-api-client/robot.js 92.18% <100%> (+2.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edc200e...6fc80ba. Read the comment docs.

Copy link
Contributor

@IanLondon IanLondon left a comment

Choose a reason for hiding this comment

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

💡 cool stuff

works on sunset, not moon-moon or VS, and the error is invisible to the user (toggle works as if it was OK), but I think that's expected behavior.

@mcous
Copy link
Contributor Author

mcous commented Jun 18, 2018

works on sunset, not moon-moon or VS, and the error is invisible to the user (toggle works as if it was OK), but I think that's expected behavior.

Unexpected, but dug into it and the gpio.py module is swallowing GPIO write errors. Will file an API ticket for that. App and top-level of the API are behaving as expected

Copy link
Contributor

@Kadee80 Kadee80 left a comment

Choose a reason for hiding this comment

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

🍕 💡

import {LabeledToggle, LabeledButton} from '../controls'

import type {State, Dispatch} from '../../types'
import type {Robot} from '../../robot'

type OP = Robot

type SP = {}
type SP = {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could make these type defs single lines

@mcous mcous merged commit d2c182c into edge Jun 18, 2018
@mcous mcous deleted the app_robot-controls-lights branch June 18, 2018 17:23
mcous added a commit that referenced this pull request Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project feature Ticket is a feature request / PR introduces a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants