FabMo-Engine icon indicating copy to clipboard operation
FabMo-Engine copied to clipboard

When FabMo loses connection to G2, it should be a less painful process

Open kyle-kingsbury opened this issue 3 years ago • 6 comments

Currently, when FabMo loses connection to G2 (G2 dies) it requires a reboot. Not really sure what this improvement entails, or how much it can be improved. Can be triggered by setting an input to "initiate G2 panic mode" then use that input.

kyle-kingsbury avatar Jun 17 '22 12:06 kyle-kingsbury

I think we could use bossac or other interface to tell the g2 card to reboot, and at the same time reboot the pi or just restart node/fabmo. Or give fabmo the ability to reset g2 card and then to try again for the usb connection.

RobMackie avatar Jun 19 '22 03:06 RobMackie

Revisit https://github.com/FabMo/FabMo-Engine/pull/944 when working on a solution. Seems like it only works sometimes.

kyle-kingsbury avatar Jun 20 '22 22:06 kyle-kingsbury

What's the "right" G2 codebase for the fabmo's G2 controller?

https://github.com/synthetos/g2/blob/edge-preview/g2core/controller.cpp#L284 suggests that sending a single character CAN command will force the G2 card to reboot.

https://github.com/synthetos/g2/blob/edge-preview/g2core/asciitable.txt#L27 (CAN is ASCII code 24 (decimail)

obra avatar Jun 23 '22 05:06 obra

@obra the correct code base is https://github.com/FabMo/FabMo-G2-Core main branch.

kyle-kingsbury avatar Jun 23 '22 09:06 kyle-kingsbury

@kyle-kingsbury Thanks! It looks like the same codepath is there, so you may be ok to use that same solution.

obra avatar Jun 23 '22 18:06 obra

Awesome. Thanks for the info!

kyle-kingsbury avatar Jun 26 '22 16:06 kyle-kingsbury