New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronous motion plus init & OSX Refactoring #30
Synchronous motion plus init & OSX Refactoring #30
Conversation
Made the Motion+ init a lot more robust Code cleanup
-This ensures the function can be called outside of motion_plus.c -Also eliminates an explicit declaration warning on events.c
-wiiuse_internal.h was already included via motion_plus.h -io.h is needed for wiiuse_read
-According to the new signature for wiiuse_io_read
…to os_*.c/os_mac.m
…le motion plus handshake is being done
Seems to build and work on Ubuntu 10.04 x64 with GCC and a MotionPlus, and with MXE cross-compiling for windows and running on Windows 7. On Linux, I sometimes get the warning On Windows, with the accelerometers turned on in the example, I occasionally get three Can't test with a nunchuk because @jscasallas still has mine, if I recall correctly. With Clang I get these build errors, fixable by adding this line to the top of os_nix.c: #include <sys/time.h> /* for struct timeval */ Not so sure about the warnings about "implicit declarations"...
|
Hello, On 12/10/2012 09:00 PM, Ryan Pavlik wrote:
That looks like a spurious message. The function event_data_write() http://wiibrew.org/wiki/Wiimote#0x22:_Acknowledge_output_report.2C_return_function_result
I have seen this too, I strongly suspect this is very much due to the 0x22 is the unsolicited report described above, 0x30 is buttons report. The message on connection is probably just too verbose, I suspect it
Looks like a missing header: #include <unistd.h> Regards, Jan |
The catch is that I'm pretty sure #include <unistd.h> is there... |
On 12/11/2012 01:25 AM, Ryan Pavlik wrote:
Could it be that the #include relies on some "gcc-ism" that Clang It is system header, so it would not surprise me all that much. Jan |
You can pull my updates to your pull request from my osx-refactor_sync-mplus branch. Thanks so much for working on this! Still get these warnings that make no sense to me given that I've got an
|
cac13f1 Add CMakePackageConfigHelpers as a backported module from 2.8.10 44e17a5 Update help 92f9405 Add FindDirectShow from VRPN a93bf46 Update FindVRPN edf459d clean up some modules 0bf8b53 Update documentation/help 900ae37 Improvements to findcppdom bcdd5ed Adrienne timecode generator finder fc14864 IDLJ finder/script 5fa91d4 Finder for windows/platform SDK 835a160 Add module to find perl modules: pass them as components 7dc76c3 cleanup 38e2a0d Create a doc_open target to open html docs e8de008 Improved directx finding 787900c Conditionally use libuuid for VPR22 1c73e35 Add a helper error message to findcppcheck. 9e8b357 Generate, rather than enumerate, juggler lib names. d42ae48 Add another compiler flag for warnings. 911f522 Just a little cleanup. a466ea5 Update help 30af184 Add two new scripts written for VR Juggler 09ccc48 Update VR Juggler finders for 3.0.1 f9a5b86 VR JuggLua is no longer unreleased research software - ditch the scary warning. 1adb75e Update GetGitRevisionDescription to handle new submodules a little better. 187b7b2 Add new FindViewPoint d1ec683 Enhance FindOpenHaptics to handle 3.1 de68fc0 Restore some tabs that went missing feb11f6 Improve GHOST finder. b922e06 Update help 7ff9c53 Run cmake-bulk-decrufter. 0873f79 Merge branch 'jscasallas/master' e2ec7cd Add helpful comment about use as submodule 2a42dc5 Simplify FindQVRPN. 8ddcb84 Windows compatibility for the pull request just merged 4fcc618 Merge pull request wiiuse#6 from phire/cmake-modules fa1ef4c Add additional versions of cppdom and gmtl. 7db0714 Regenerate help 39c0f2f Add find directinput d2e2a74 Update copyright year 5c05172 Update module help 5b62638 Rename to UseMarkdown and add rename feature f92055a Add markdown scripts (finding and targets) 00cefbe GetGitRevisionDescription: Search parent dirs for .git/ 0fb259a New module: FindQVRPN.cmake 9616f6e Find jccl and vrjuggler plugins, and split between debug and release 4856978 Set WIIUSE_RUNTIME_LIBRARY in Wiiuse even not on Windows d94b209 make FindWinHID work on MinGW. 4c110cb Fix copy-pasteo in findcppunit 8be460a fix doc typo 6a78da3 Handle other compilers better by using compiler ID a90f87b Use compiler behavior, not identity, to decide what warning flags to use f03d7a8 Properly check the various arguments to cppcheck rather than assume based on a few tests. d3ffd8a get git revision more robustly 1fb0e41 update ghost fake stl to simplify header 6fbe007 No more checking the stdc++ version for openhaptics db11bb9 make sure we actually link against HDU/HLU nested targets! a6580e9 remove unused variables in test file f4a26c5 update copyright 16a6266 fix dcubed nested target ca5cd7a mark luac item as advanced f131cbe actually use the jttk root dir specified 501dbb2 improve dcubed include dirs ae8764f improve splitting osg plugins into debug and release git-subtree-dir: cmake git-subtree-split: cac13f1c3225555cec9ae06a1ba47baa8c90442a
Merge commit 'dd2c7e902aa095fd7844329e38bca7cd7c51e6d9' into osx-refactor_sync-mplus Conflicts: cmake/FindWinHID.cmake
OK, well, I've tested this (with my modifications - @lysannkessler please pull from my same-named branch and push it to this pull request) fairly well - see https://github.com/rpavlik/wiiuse/wiki/Compatibility for the nitty-gritty. If someone else could test, particularly with some non-official peripherals and/or a Mac, that would be great. (I'd really like to merge this and release 0.15!) @lysannkessler - please also add yourself to the README and update the changelog how you see fit. Once it's been merged, we'll get @janoc to add to the changelog, etc. |
I added the warning in the case messages are dropped in wiiuse_wait_report, mainly for debugging purposes. Would you suggest to change the log too WIIUSE_DEBUG instead of WIIUSE_WARNING? |
On Wed, Dec 12, 2012 at 1:34 PM, Lysann Schlegel
Probably a good idea, since it seems like occasional messages of this type Ryan Pavlik |
I want add this to the discussion, but probably we don't want to bother about the warnings right now. |
I've "moved" the issue about warnings to #36 to be tracked separately. |
I pulled your changes and added myself to the list of contributors :) |
Great, thanks! |
Synchronous motion plus init & OSX Refactoring. Incorporates work by lysannkessler, janoc, and jscasallas.
@lysannkessler I've added you as a collaborator on this repo. You're still welcome to use pull requests (within this repo between branches, if you like, for easier collaboration), but at the same time also welcome to just commit if you wish (just as @janoc and @jscasallas can) |
Includes all changes from #14 and #26.
Yes, there were several of conflicts, but I am confident I resolved them all correctly.
This branch also moves all platform-specific read and write code into wiiuse_os_read and wiiuse_os_write.
This ensures that the same interface is used for all wiiuse_io_read and wiiuse_io_write implementations. Especially inserting the SET_OUTPUT_REPORT byte on Mac and Linux is handled within these functions now, and not outside. The callers of these functions never see this first byte.
I tested with a Wiimote and Nunchuk with and without M+ on Mac and Windows, but I don't have a Linux box with Bluetooth available.