Stop BrickPi3 and print out error msg if I can figure out how to differentiate between normal exit and crash then I'll consider having a popup window here.
()
| 39 | |
| 40 | @atexit.register |
| 41 | def cleanup(): |
| 42 | ''' |
| 43 | Stop BrickPi3 and print out error msg |
| 44 | if I can figure out how to differentiate between normal exit and crash |
| 45 | then I'll consider having a popup window here. |
| 46 | ''' |
| 47 | try: |
| 48 | gpg.reset_all() |
| 49 | # we want the gopigo3 to stop if gopigo3Scratch.py crashes |
| 50 | except: |
| 51 | pass |
| 52 | logger.info ("Scratch Interpreter closed") |
| 53 | |
| 54 | def detect_distance_sensor(): |
| 55 | ''' |