{"action":"created","issue":{"url":"https://api.github.com/repos/firmata/arduino/issues/213","labels_url":"https://api.github.com/repos/firmata/arduino/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/firmata/arduino/issues/213/comments","events_url":"https://api.github.com/repos/firmata/arduino/issues/213/events","html_url":"https://github.com/firmata/arduino/pull/213","id":102129502,"number":213,"title":"Moving Firmata constants into separate file to allow direct linking in C projects","user":{"login":"evanlooij","id":477507,"avatar_url":"https://avatars.githubusercontent.com/u/477507?v=3","gravatar_id":"","url":"https://api.github.com/users/evanlooij","html_url":"https://github.com/evanlooij","followers_url":"https://api.github.com/users/evanlooij/followers","following_url":"https://api.github.com/users/evanlooij/following{/other_user}","gists_url":"https://api.github.com/users/evanlooij/gists{/gist_id}","starred_url":"https://api.github.com/users/evanlooij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanlooij/subscriptions","organizations_url":"https://api.github.com/users/evanlooij/orgs","repos_url":"https://api.github.com/users/evanlooij/repos","events_url":"https://api.github.com/users/evanlooij/events{/privacy}","received_events_url":"https://api.github.com/users/evanlooij/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-20T12:41:39Z","updated_at":"2015-08-26T15:26:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/firmata/arduino/pulls/213","html_url":"https://github.com/firmata/arduino/pull/213","diff_url":"https://github.com/firmata/arduino/pull/213.diff","patch_url":"https://github.com/firmata/arduino/pull/213.patch"},"body":"I'm working with ADArduino and iFirmata client libraries and found that each used its own (version of) the Firmata constants. Including Firmata.h doesn't work because of its dependencies on other arduino classes which have no place in a client library. The easiest solution is to move the constants into their own header file. To facilitate modular checking out and inclusion by way of Subversion externals, the Firmata_Constants header should be in its own folder.\r\nTo clarify, the structure that I'm proposing is:\r\n\r\narduino\r\n* constants\r\n   *  Firmata_Constants.h\r\n* Firmata.h        (#import \"Firmata_Constants.h\")\r\n* Firmata.cpp   (no changes)\r\n*   ...\r\n  "},"comment":{"url":"https://api.github.com/repos/firmata/arduino/issues/comments/135062382","html_url":"https://github.com/firmata/arduino/pull/213#issuecomment-135062382","issue_url":"https://api.github.com/repos/firmata/arduino/issues/213","id":135062382,"user":{"login":"soundanalogous","id":401539,"avatar_url":"https://avatars.githubusercontent.com/u/401539?v=3","gravatar_id":"","url":"https://api.github.com/users/soundanalogous","html_url":"https://github.com/soundanalogous","followers_url":"https://api.github.com/users/soundanalogous/followers","following_url":"https://api.github.com/users/soundanalogous/following{/other_user}","gists_url":"https://api.github.com/users/soundanalogous/gists{/gist_id}","starred_url":"https://api.github.com/users/soundanalogous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundanalogous/subscriptions","organizations_url":"https://api.github.com/users/soundanalogous/orgs","repos_url":"https://api.github.com/users/soundanalogous/repos","events_url":"https://api.github.com/users/soundanalogous/events{/privacy}","received_events_url":"https://api.github.com/users/soundanalogous/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T15:26:32Z","updated_at":"2015-08-26T15:26:32Z","body":"What might be better is to remove all Arduino specific code from Firmata.cpp and make it a general purpose C++ library. Then Firmata.h, Firmata.cpp and FirmataFreatures.h (what you're calling Firmata_Constants) would work with any c-based client as is. The project is currently called /firmata/arduino/ because it is the Arduino implementation of the Firmata protocol. There is currently no general purpose C/C++ version. Want to take the lead on that? I may not have time for a while."}}