awvalenti / bauhinia Goto Github PK
View Code? Open in Web Editor NEWCross-platform Wii Remote Java library and remote controller application
License: GNU General Public License v3.0
Cross-platform Wii Remote Java library and remote controller application
License: GNU General Public License v3.0
From wiiusej project. Should go to a separate github repo.
Examples of errors to be handled:
This happens when trying to execute two coronata applications at the same time. Must decide whether this will be allowed or not. Allowing it may cause security risks (i.e., running arbitrary native code) and requires detecting the dll/so file extraction failure. Prohibiting it is both easier and safer, but disallows two coronata applications running at the same time, which might not be useful in practice anyway.
User should be able to disconnect Wii Remote from app interface. coronata will probably need to be updated, too.
1 should correspond to F5 and 2 should correspond to ESC
Strings like /com/github/awvalenti/*
should go to properties in a file
Even an infinite timeout should be allowed, which means that search should be repeated infinite times.
Hi,
I am testing the development in a embedded environment, but the device only have a JRE, the software doesn´t work.
robot@ev3dev:~$ java -jar nitida-0.1.0.jar --console
nitida Copyright (C) 2015 Andre Willik Valenti
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
Licensed under GPLv3. For more information, please visit:
http://www.gnu.org/licenses/gpl-3.0.en.html
For source code and project information, please visit:
https://github.com/awvalenti/bauhinia
Exception in thread "main" java.lang.RuntimeException: java.awt.AWTException: headless environment
at com.github.awvalenti.bauhinia.nitida.model.NitidaModel.<init>(NitidaModel.java:24)
at com.github.awvalenti.bauhinia.nitida.NitidaMain.runNitidaConsole(NitidaMain.java:69)
at com.github.awvalenti.bauhinia.nitida.NitidaMain.main(NitidaMain.java:29)
Caused by: java.awt.AWTException: headless environment
at java.awt.Robot.<init>(Robot.java:94)
at com.github.awvalenti.bauhinia.nitida.model.NitidaModel.<init>(NitidaModel.java:22)
... 2 more
This will probably need pressing same key many times, which is a little complicated to implement. Must release key before pressing it again and/or adding a delay.
From:
Should go to a separate github repo
nitida currently uses java.awt.Robot, which unfortunately depends on a graphical environment to run. If issue #16 is solved, we could find a substitute for java.awt.Robot to be used on scenarios like Raspberry Pi. It could be platform-dependent (working only on Linux ARM, for example), because java.awt.Robot takes care of the other environments.
This will apply to new tags, branches and Maven modules versions. Also, change 0.2.0-SNAPSHOT to 0.2.x.
These names reflect the internals, not the user intent, which should be clear.
Should the programmer indicate how many wii remotes to connect before calling the method? Or should coronata search for all available ones? To be able to extend search timeout (#12), first option seems better. I can imagine a game where any number of players is welcome, and this scenario seems better served by second option. Maybe coronata should offer both.
Currently, method turnLedOn
only allows setting led 1, or 2, or 3, or 4. Things like setting led 1 and 3 should be possible.
See http://wiibrew.org/wiki/Wiimote#Speaker.
Should be easy when using BlueCove. Might be hard when using WiiuseJ.
Check if 80 columns max is appropriate
Instead of "not using Eclipse", should erase .m2/repository/com/github/awvalenti/bauhinia/* and rebuild, regardless of using Eclipse or not, since it also happens on command line Maven.
coronata API should become easier and cleaner.
Many events are fired in a somewhat unpredictable way, especially when searching for Bluetooh devices. Should make sure these work together in a thread-safe way.
Could cite these videos:
For each line of text, add a bullet character before and a line break after
On Windows, a led is lit automatically on Wii Remote connection. This might not be desired by the application developer.
Some classes that have non-externalized strings:
Stuff like /com/github/awvalenti/bauhinia/nitida/button-mapping/...
Game loops usually query for buttons state instead of handling button press and release events. Applications like these would benefit from such an API.
To be the equivalent of JavaScript's setTimeout(function() {...}, 0).
This applies especially the connected event.
Something like SwingUtilities.invokeLater may do the job, but we should not depend on Swing being available.
Should make a more concise coronata events class architecture. Should probably eliminate difference between observers and listeners. Should eliminate duplicated method wiiRemoteDisconnected on interfaces CoronataFullObserver and WiiRemoteDisconnectionListener.
Also known as Nintendo RVL-CNT-01-TR (see http://wiibrew.org/wiki/Wiimote)
...in case user presses a button, changes profile and then releases the button (or similar scenarios)
An application may throw an exception when handling buttonPressed or buttonRelease. This may be relatively common and must be handled on Mediator to guarantee ButtonHandlerThread stays alive.
Some users might want just the buttonPressed event. In particular, this would enable using Java 8 lambdas.
Should refactor vibration demo to use only buttonPressed.
Currently, the native libraries used by coronata are compiled to x86 architecture, so they probably won't work on ARM processors.
Maybe provide two APIs: one that throws exception on error, another one that just returns a boolean or a String.
Different applications have slightly different keyboard shortcuts. There should be one profile for each application. The main difference lies on the command "start presentation from current slide": SHIFT+F5 on PowerPoint, F5 on Impress and CTRL+F5 on Google Docs.
Events fired by coronata are currently handled directly, on the same thread and without try/catches. This makes it very susceptible to errors. In particular, ButtonHandlerThread should keep running if buttonPressed or Released throws an exception.
Maybe EventsMediator should handle the exceptions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.