{"action":"created","issue":{"url":"https://api.github.com/repos/opentx/opentx/issues/2209","labels_url":"https://api.github.com/repos/opentx/opentx/issues/2209/labels{/name}","comments_url":"https://api.github.com/repos/opentx/opentx/issues/2209/comments","events_url":"https://api.github.com/repos/opentx/opentx/issues/2209/events","html_url":"https://github.com/opentx/opentx/pull/2209","id":69307827,"number":2209,"title":"EEPROM on Sky9x","user":{"login":"bsongis","id":5603504,"avatar_url":"https://avatars.githubusercontent.com/u/5603504?v=3","gravatar_id":"","url":"https://api.github.com/users/bsongis","html_url":"https://github.com/bsongis","followers_url":"https://api.github.com/users/bsongis/followers","following_url":"https://api.github.com/users/bsongis/following{/other_user}","gists_url":"https://api.github.com/users/bsongis/gists{/gist_id}","starred_url":"https://api.github.com/users/bsongis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsongis/subscriptions","organizations_url":"https://api.github.com/users/bsongis/orgs","repos_url":"https://api.github.com/users/bsongis/repos","events_url":"https://api.github.com/users/bsongis/events{/privacy}","received_events_url":"https://api.github.com/users/bsongis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"MikeBland","id":6413420,"avatar_url":"https://avatars.githubusercontent.com/u/6413420?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeBland","html_url":"https://github.com/MikeBland","followers_url":"https://api.github.com/users/MikeBland/followers","following_url":"https://api.github.com/users/MikeBland/following{/other_user}","gists_url":"https://api.github.com/users/MikeBland/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeBland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeBland/subscriptions","organizations_url":"https://api.github.com/users/MikeBland/orgs","repos_url":"https://api.github.com/users/MikeBland/repos","events_url":"https://api.github.com/users/MikeBland/events{/privacy}","received_events_url":"https://api.github.com/users/MikeBland/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-04-18T13:13:10Z","updated_at":"2015-04-19T18:05:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opentx/opentx/pulls/2209","html_url":"https://github.com/opentx/opentx/pull/2209","diff_url":"https://github.com/opentx/opentx/pull/2209.diff","patch_url":"https://github.com/opentx/opentx/pull/2209.patch"},"body":"I changed the EEPROM file system on Sky9x because the actual max size for a file is around 4k\r\nWith the telemetry refactoring I need around 5k.\r\nHere are some random bits as an explanation: \r\n- we have 4kbits = 512kbytes available\r\n- we have 64 files of 8kbytes each (2blocks) : 1 FAT + 1 General + 60 Models + 2 Temp\r\n- only 128bytes are needed for the FAT, 1st time the FAT is written, the 1st block is ERASED, then 128 first bytes written ; second time, the 128 first bytes are overwritten with 0 (because we can only write 0 there if we don't want to ERASE the block each time), and the real FAT is written in bytes [128:256]\r\n- when writing a file we write it in a Temp file, and at the end we update the FAT (as explained above) with the new references of the blocks used\r\n\r\nI am not sure I am clear enough. This explanation could be written in the eeprom_arm.cpp file as a doxygen comment, feel free to reword it, I am not native english! "},"comment":{"url":"https://api.github.com/repos/opentx/opentx/issues/comments/94301846","html_url":"https://github.com/opentx/opentx/pull/2209#issuecomment-94301846","issue_url":"https://api.github.com/repos/opentx/opentx/issues/2209","id":94301846,"user":{"login":"bsongis","id":5603504,"avatar_url":"https://avatars.githubusercontent.com/u/5603504?v=3","gravatar_id":"","url":"https://api.github.com/users/bsongis","html_url":"https://github.com/bsongis","followers_url":"https://api.github.com/users/bsongis/followers","following_url":"https://api.github.com/users/bsongis/following{/other_user}","gists_url":"https://api.github.com/users/bsongis/gists{/gist_id}","starred_url":"https://api.github.com/users/bsongis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsongis/subscriptions","organizations_url":"https://api.github.com/users/bsongis/orgs","repos_url":"https://api.github.com/users/bsongis/repos","events_url":"https://api.github.com/users/bsongis/events{/privacy}","received_events_url":"https://api.github.com/users/bsongis/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T18:05:09Z","updated_at":"2015-04-19T18:05:09Z","body":"Interesting comment from Mike:\r\n\"Bertrand,\r\nGenerally looks OK, although I would handle the FAT slightly differently. I'd use the incrementing ID method to mark up the latest FAT, rather than write zeroes over them. It would also use half the number of writes to each byte. I would also probably include a checksum in the FAT.\r\nIt also means a previous FAT is still available, so , in the event of a write failing, you still have the last FAT to go back to.\""}}