{"action":"opened","issue":{"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/192","labels_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/192/comments","events_url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/issues/192/events","html_url":"https://github.com/autosportlabs/RaceCapture-Pro_firmware/issues/192","id":113473885,"number":192,"title":"need user to bypass Lua script if system watchdogs","user":{"login":"ryandoherty","id":45628,"avatar_url":"https://avatars.githubusercontent.com/u/45628?v=3","gravatar_id":"","url":"https://api.github.com/users/ryandoherty","html_url":"https://github.com/ryandoherty","followers_url":"https://api.github.com/users/ryandoherty/followers","following_url":"https://api.github.com/users/ryandoherty/following{/other_user}","gists_url":"https://api.github.com/users/ryandoherty/gists{/gist_id}","starred_url":"https://api.github.com/users/ryandoherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryandoherty/subscriptions","organizations_url":"https://api.github.com/users/ryandoherty/orgs","repos_url":"https://api.github.com/users/ryandoherty/repos","events_url":"https://api.github.com/users/ryandoherty/events{/privacy}","received_events_url":"https://api.github.com/users/ryandoherty/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/autosportlabs/RaceCapture-Pro_firmware/labels/v2.8.5%20Done","name":"v2.8.5 Done","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-26T23:43:33Z","updated_at":"2015-10-26T23:43:33Z","closed_at":null,"body":"Need a better way to handle watchdogs. Right now, if the unit watchdogs the Lua script is bypassed, with the tacit assumption it was the Lua script causing the problem. That may or may not be the case.\n\nIn an ideal world, any issues with the Lua script should be handled by the Lua interpreter, safely catching errors and preventing a complete system crash.\n\nWith more systems relying on Lua script functionality, a watchdog condition should still launch the lua script.  \n\nIf we do this, however, a critically crashing lua script that somehow causes a segfault could soft-brick the unit (making it really hard for the user to recover).\n\nProposed: A better way to bypass the script upon a watchdog reboot.  If a watchdog occurs, pause loading of script for X amount of time - possibly flashing LEDs in a pattern. If the button is pressed during this time, Lua script is bypassed. This would allow the system to be recovered from a bad script.\n"}}