{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/1","id":40853214,"html_url":"https://github.com/mxmxmx/temps_utile-/pull/1","diff_url":"https://github.com/mxmxmx/temps_utile-/pull/1.diff","patch_url":"https://github.com/mxmxmx/temps_utile-/pull/1.patch","issue_url":"https://api.github.com/repos/mxmxmx/temps_utile-/issues/1","number":1,"state":"open","locked":false,"title":"Save settings in EEPROM","user":{"login":"patrickdowling","id":4163824,"avatar_url":"https://avatars.githubusercontent.com/u/4163824?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickdowling","html_url":"https://github.com/patrickdowling","followers_url":"https://api.github.com/users/patrickdowling/followers","following_url":"https://api.github.com/users/patrickdowling/following{/other_user}","gists_url":"https://api.github.com/users/patrickdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickdowling/subscriptions","organizations_url":"https://api.github.com/users/patrickdowling/orgs","repos_url":"https://api.github.com/users/patrickdowling/repos","events_url":"https://api.github.com/users/patrickdowling/events{/privacy}","received_events_url":"https://api.github.com/users/patrickdowling/received_events","type":"User","site_admin":false},"body":"Settings are saved when the UI times out and goes back to the idle screen, and only if the values have changed. The latest commits now save the internal clock BPM settings, and initialize the number of parameters as well as min/max values after loading. That seems to be enough, but I might have missed some internals.\r\n\r\nThe loaded values aren't explicitly re-checked for plausibility or min/max, but this could be added.\r\n\r\nAt the expense of some uncessary writes, the ::save function can drop the dirty check and rely on the low-level ::update function to check that data needs to be written. This might make it a bit faster if it throws the timing off. There are also better solutions to the brute-force comparison, e.g. setting a dirty flag in the UI, but this seemed a bit invasive.\r\n\r\nI've used https://github.com/PaulStoffregen/EEPROM locally.\r\n\r\nLet me know how it goes :smiley:","created_at":"2015-07-26T13:29:10Z","updated_at":"2015-07-26T13:29:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79b44880f941a9a6325befe16979a0713d2ee70b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mxmxmx/temps_utile-/issues/1/comments","statuses_url":"https://api.github.com/repos/mxmxmx/temps_utile-/statuses/346f1b7bfc61d93c0807eab7985b5a400fe71499","head":{"label":"patrickdowling:save_settings","ref":"save_settings","sha":"346f1b7bfc61d93c0807eab7985b5a400fe71499","user":{"login":"patrickdowling","id":4163824,"avatar_url":"https://avatars.githubusercontent.com/u/4163824?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickdowling","html_url":"https://github.com/patrickdowling","followers_url":"https://api.github.com/users/patrickdowling/followers","following_url":"https://api.github.com/users/patrickdowling/following{/other_user}","gists_url":"https://api.github.com/users/patrickdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickdowling/subscriptions","organizations_url":"https://api.github.com/users/patrickdowling/orgs","repos_url":"https://api.github.com/users/patrickdowling/repos","events_url":"https://api.github.com/users/patrickdowling/events{/privacy}","received_events_url":"https://api.github.com/users/patrickdowling/received_events","type":"User","site_admin":false},"repo":{"id":34668605,"name":"temps_utile-","full_name":"patrickdowling/temps_utile-","owner":{"login":"patrickdowling","id":4163824,"avatar_url":"https://avatars.githubusercontent.com/u/4163824?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickdowling","html_url":"https://github.com/patrickdowling","followers_url":"https://api.github.com/users/patrickdowling/followers","following_url":"https://api.github.com/users/patrickdowling/following{/other_user}","gists_url":"https://api.github.com/users/patrickdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickdowling/subscriptions","organizations_url":"https://api.github.com/users/patrickdowling/orgs","repos_url":"https://api.github.com/users/patrickdowling/repos","events_url":"https://api.github.com/users/patrickdowling/events{/privacy}","received_events_url":"https://api.github.com/users/patrickdowling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patrickdowling/temps_utile-","description":"teensy 3.1 trigger generator","fork":true,"url":"https://api.github.com/repos/patrickdowling/temps_utile-","forks_url":"https://api.github.com/repos/patrickdowling/temps_utile-/forks","keys_url":"https://api.github.com/repos/patrickdowling/temps_utile-/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patrickdowling/temps_utile-/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patrickdowling/temps_utile-/teams","hooks_url":"https://api.github.com/repos/patrickdowling/temps_utile-/hooks","issue_events_url":"https://api.github.com/repos/patrickdowling/temps_utile-/issues/events{/number}","events_url":"https://api.github.com/repos/patrickdowling/temps_utile-/events","assignees_url":"https://api.github.com/repos/patrickdowling/temps_utile-/assignees{/user}","branches_url":"https://api.github.com/repos/patrickdowling/temps_utile-/branches{/branch}","tags_url":"https://api.github.com/repos/patrickdowling/temps_utile-/tags","blobs_url":"https://api.github.com/repos/patrickdowling/temps_utile-/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patrickdowling/temps_utile-/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patrickdowling/temps_utile-/git/refs{/sha}","trees_url":"https://api.github.com/repos/patrickdowling/temps_utile-/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patrickdowling/temps_utile-/statuses/{sha}","languages_url":"https://api.github.com/repos/patrickdowling/temps_utile-/languages","stargazers_url":"https://api.github.com/repos/patrickdowling/temps_utile-/stargazers","contributors_url":"https://api.github.com/repos/patrickdowling/temps_utile-/contributors","subscribers_url":"https://api.github.com/repos/patrickdowling/temps_utile-/subscribers","subscription_url":"https://api.github.com/repos/patrickdowling/temps_utile-/subscription","commits_url":"https://api.github.com/repos/patrickdowling/temps_utile-/commits{/sha}","git_commits_url":"https://api.github.com/repos/patrickdowling/temps_utile-/git/commits{/sha}","comments_url":"https://api.github.com/repos/patrickdowling/temps_utile-/comments{/number}","issue_comment_url":"https://api.github.com/repos/patrickdowling/temps_utile-/issues/comments{/number}","contents_url":"https://api.github.com/repos/patrickdowling/temps_utile-/contents/{+path}","compare_url":"https://api.github.com/repos/patrickdowling/temps_utile-/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patrickdowling/temps_utile-/merges","archive_url":"https://api.github.com/repos/patrickdowling/temps_utile-/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patrickdowling/temps_utile-/downloads","issues_url":"https://api.github.com/repos/patrickdowling/temps_utile-/issues{/number}","pulls_url":"https://api.github.com/repos/patrickdowling/temps_utile-/pulls{/number}","milestones_url":"https://api.github.com/repos/patrickdowling/temps_utile-/milestones{/number}","notifications_url":"https://api.github.com/repos/patrickdowling/temps_utile-/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patrickdowling/temps_utile-/labels{/name}","releases_url":"https://api.github.com/repos/patrickdowling/temps_utile-/releases{/id}","created_at":"2015-04-27T13:33:48Z","updated_at":"2015-04-27T13:33:49Z","pushed_at":"2015-07-26T13:25:11Z","git_url":"git://github.com/patrickdowling/temps_utile-.git","ssh_url":"git@github.com:patrickdowling/temps_utile-.git","clone_url":"https://github.com/patrickdowling/temps_utile-.git","svn_url":"https://github.com/patrickdowling/temps_utile-","homepage":null,"size":1998,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mxmxmx:master","ref":"master","sha":"7587d3ba40364ae86d3c6655a16cf68ac486bdf3","user":{"login":"mxmxmx","id":4531575,"avatar_url":"https://avatars.githubusercontent.com/u/4531575?v=3","gravatar_id":"","url":"https://api.github.com/users/mxmxmx","html_url":"https://github.com/mxmxmx","followers_url":"https://api.github.com/users/mxmxmx/followers","following_url":"https://api.github.com/users/mxmxmx/following{/other_user}","gists_url":"https://api.github.com/users/mxmxmx/gists{/gist_id}","starred_url":"https://api.github.com/users/mxmxmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxmxmx/subscriptions","organizations_url":"https://api.github.com/users/mxmxmx/orgs","repos_url":"https://api.github.com/users/mxmxmx/repos","events_url":"https://api.github.com/users/mxmxmx/events{/privacy}","received_events_url":"https://api.github.com/users/mxmxmx/received_events","type":"User","site_admin":false},"repo":{"id":24475222,"name":"temps_utile-","full_name":"mxmxmx/temps_utile-","owner":{"login":"mxmxmx","id":4531575,"avatar_url":"https://avatars.githubusercontent.com/u/4531575?v=3","gravatar_id":"","url":"https://api.github.com/users/mxmxmx","html_url":"https://github.com/mxmxmx","followers_url":"https://api.github.com/users/mxmxmx/followers","following_url":"https://api.github.com/users/mxmxmx/following{/other_user}","gists_url":"https://api.github.com/users/mxmxmx/gists{/gist_id}","starred_url":"https://api.github.com/users/mxmxmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxmxmx/subscriptions","organizations_url":"https://api.github.com/users/mxmxmx/orgs","repos_url":"https://api.github.com/users/mxmxmx/repos","events_url":"https://api.github.com/users/mxmxmx/events{/privacy}","received_events_url":"https://api.github.com/users/mxmxmx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mxmxmx/temps_utile-","description":"teensy 3.1 trigger generator","fork":false,"url":"https://api.github.com/repos/mxmxmx/temps_utile-","forks_url":"https://api.github.com/repos/mxmxmx/temps_utile-/forks","keys_url":"https://api.github.com/repos/mxmxmx/temps_utile-/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mxmxmx/temps_utile-/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mxmxmx/temps_utile-/teams","hooks_url":"https://api.github.com/repos/mxmxmx/temps_utile-/hooks","issue_events_url":"https://api.github.com/repos/mxmxmx/temps_utile-/issues/events{/number}","events_url":"https://api.github.com/repos/mxmxmx/temps_utile-/events","assignees_url":"https://api.github.com/repos/mxmxmx/temps_utile-/assignees{/user}","branches_url":"https://api.github.com/repos/mxmxmx/temps_utile-/branches{/branch}","tags_url":"https://api.github.com/repos/mxmxmx/temps_utile-/tags","blobs_url":"https://api.github.com/repos/mxmxmx/temps_utile-/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mxmxmx/temps_utile-/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mxmxmx/temps_utile-/git/refs{/sha}","trees_url":"https://api.github.com/repos/mxmxmx/temps_utile-/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mxmxmx/temps_utile-/statuses/{sha}","languages_url":"https://api.github.com/repos/mxmxmx/temps_utile-/languages","stargazers_url":"https://api.github.com/repos/mxmxmx/temps_utile-/stargazers","contributors_url":"https://api.github.com/repos/mxmxmx/temps_utile-/contributors","subscribers_url":"https://api.github.com/repos/mxmxmx/temps_utile-/subscribers","subscription_url":"https://api.github.com/repos/mxmxmx/temps_utile-/subscription","commits_url":"https://api.github.com/repos/mxmxmx/temps_utile-/commits{/sha}","git_commits_url":"https://api.github.com/repos/mxmxmx/temps_utile-/git/commits{/sha}","comments_url":"https://api.github.com/repos/mxmxmx/temps_utile-/comments{/number}","issue_comment_url":"https://api.github.com/repos/mxmxmx/temps_utile-/issues/comments{/number}","contents_url":"https://api.github.com/repos/mxmxmx/temps_utile-/contents/{+path}","compare_url":"https://api.github.com/repos/mxmxmx/temps_utile-/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mxmxmx/temps_utile-/merges","archive_url":"https://api.github.com/repos/mxmxmx/temps_utile-/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mxmxmx/temps_utile-/downloads","issues_url":"https://api.github.com/repos/mxmxmx/temps_utile-/issues{/number}","pulls_url":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls{/number}","milestones_url":"https://api.github.com/repos/mxmxmx/temps_utile-/milestones{/number}","notifications_url":"https://api.github.com/repos/mxmxmx/temps_utile-/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mxmxmx/temps_utile-/labels{/name}","releases_url":"https://api.github.com/repos/mxmxmx/temps_utile-/releases{/id}","created_at":"2014-09-25T21:05:43Z","updated_at":"2015-05-08T13:49:22Z","pushed_at":"2015-07-26T13:29:11Z","git_url":"git://github.com/mxmxmx/temps_utile-.git","ssh_url":"git@github.com:mxmxmx/temps_utile-.git","clone_url":"https://github.com/mxmxmx/temps_utile-.git","svn_url":"https://github.com/mxmxmx/temps_utile-","homepage":null,"size":2352,"stargazers_count":5,"watchers_count":5,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/1"},"html":{"href":"https://github.com/mxmxmx/temps_utile-/pull/1"},"issue":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/issues/1"},"comments":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mxmxmx/temps_utile-/statuses/346f1b7bfc61d93c0807eab7985b5a400fe71499"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":10,"additions":345,"deletions":51,"changed_files":5}}