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

Status outputs #135

Open
hareedy opened this issue May 30, 2016 · 4 comments
Open

Status outputs #135

hareedy opened this issue May 30, 2016 · 4 comments

Comments

@hareedy
Copy link

hareedy commented May 30, 2016

Hey,
I'm trying to have couple leds indicating "cycle start" and feed hold" so i added these fuzzy function to canonical_machine.cpp

void stat_out_leds(void)
{
if (cm.hold_state == FEEDHOLD_HOLD){
feedhold_pin.set(); <<< pin 55 on the Due
}
else{
feedhold_pin.clear();
}
}

and called it back here in controller.cpp
void controller_run()
{
while (true) {
_controller_HSM();
stat_out_leds(); <<<<
}
}

Works fine, but i'm not sure if it's the best place to call the function back.

@giseburt
Copy link
Member

It'll work for now. In the next major push we will have proper inputs and outputs in JSON. I hadn't thought about using thn outputs to indicate state before but it seems like a reasonable thing to support natively. I'll mark this as a feature request so it stays on the radar.

@hareedy
Copy link
Author

hareedy commented May 30, 2016

Thank you, also i'm working on adding physical controls (Cycle start, Pause, Resume) by setting the cm.hold_state and cm.cycle_state and i was worried about the calling location (PS. very very lousy coding skills here as i'm an electrical engineer :) ). any way thank you and waiting for the new push.

@ryansturmer
Copy link
Contributor

Yes, having an output that indicates "in cycle" is also valuable.

@aldenhart
Copy link
Member

Update: This is planned for the edge-100 branch but is not yet available. Please stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants