{"action":"created","issue":{"url":"https://api.github.com/repos/iNavFlight/inav/issues/519","repository_url":"https://api.github.com/repos/iNavFlight/inav","labels_url":"https://api.github.com/repos/iNavFlight/inav/issues/519/labels{/name}","comments_url":"https://api.github.com/repos/iNavFlight/inav/issues/519/comments","events_url":"https://api.github.com/repos/iNavFlight/inav/issues/519/events","html_url":"https://github.com/iNavFlight/inav/issues/519","id":173695849,"number":519,"title":"HAL: Unify sensor interface","user":{"login":"digitalentity","id":11059099,"avatar_url":"https://avatars.githubusercontent.com/u/11059099?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalentity","html_url":"https://github.com/digitalentity","followers_url":"https://api.github.com/users/digitalentity/followers","following_url":"https://api.github.com/users/digitalentity/following{/other_user}","gists_url":"https://api.github.com/users/digitalentity/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalentity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalentity/subscriptions","organizations_url":"https://api.github.com/users/digitalentity/orgs","repos_url":"https://api.github.com/users/digitalentity/repos","events_url":"https://api.github.com/users/digitalentity/events{/privacy}","received_events_url":"https://api.github.com/users/digitalentity/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-29T04:50:54Z","updated_at":"2016-08-29T06:12:04Z","closed_at":null,"body":"Currently each sensor uses it's own interface for detection, init, configuring and reading. I think we need to unify this. Possibly each sensor driver should expose a method table allowing the following:\r\n\r\n```\r\nbool detect(void);\r\nbool init(void * initParams);  // initParams are sensor-dependent\r\nbool setParam(int paramId, int paramValue);  // sensor dependent data\r\nbool read(void * buf);  // sensor-dependent data\r\nvoid poll(void); // a method to be called periodically by a task to allow driver to do something in the background\r\n```\r\n\r\nAll current sensors (ACC, GYRO, MAG, BARO, RANGEFINDER, GPS) should be converted to use this framework.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/iNavFlight/inav/issues/comments/243039984","html_url":"https://github.com/iNavFlight/inav/issues/519#issuecomment-243039984","issue_url":"https://api.github.com/repos/iNavFlight/inav/issues/519","id":243039984,"user":{"login":"martinbudden","id":194586,"avatar_url":"https://avatars.githubusercontent.com/u/194586?v=3","gravatar_id":"","url":"https://api.github.com/users/martinbudden","html_url":"https://github.com/martinbudden","followers_url":"https://api.github.com/users/martinbudden/followers","following_url":"https://api.github.com/users/martinbudden/following{/other_user}","gists_url":"https://api.github.com/users/martinbudden/gists{/gist_id}","starred_url":"https://api.github.com/users/martinbudden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinbudden/subscriptions","organizations_url":"https://api.github.com/users/martinbudden/orgs","repos_url":"https://api.github.com/users/martinbudden/repos","events_url":"https://api.github.com/users/martinbudden/events{/privacy}","received_events_url":"https://api.github.com/users/martinbudden/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T06:12:04Z","updated_at":"2016-08-29T06:12:04Z","body":"Yes, I agree about the detect -> init -> read chain."}}
{"actor":{"display_login":"martinbudden"}}