Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Created a PTPIP Canon API, tested on Powershot V10.
Here is the start to a description on how to use and what the current implementation state is like, more details to come.
Updated new trait dialog to have single "Photo" trait, when chosen, the user selects the type of camera they want to use as a parameter.
Added a generic camera trait ui implementation, but other camera traits still need to be migrated to it.
Added a preference for Canon with the following: wifi ssid name, ip address, port, debug, help.
Setting up the canon:
This implementation relies on setting the camera into an AP mode. Cameras will have different ways to do this, but generally go to the connection settings and find 'Connect to smartphone(tablet)', choose 'Add a device to connect to', choose 'Camera access point mode', choose 'Manual connection', use all the defaults EXCEPT encryption must be None, as AES does not work on Android devices. This will start a connection dialog on the camera, once a canon trait is created on FB and navigated to, a connection will be acknowledged. When the connection is acknowledged, a prompt will show on the camera. This should only need to be done once. Later when turning the camera on/off, there should be a "Field Book" option instead of "Add a device to connect to".
When navigating to the canon trait from config activity, the user will see a connection button. The connection button is not necessary, but it will reset the network scan. If a connection is already open, the camera trait will resume the connection, even when navigating to other plots. Capturing a picture will save to the plot it was captured on, even if navigated away. If a connection has not happened yet, a system network dialog should eventually pop-up showing the AP SSID (which should contain your preference SSID string). I've noticed that Android doesn't like to update the network lists, sometimes if you don't see this dialog you have to pull down your settings menu, click the "Internet" chip-button, wait for your network to be populated in the system list, then navigate back to FB (there's some room for improvement here)
If something does not work, make sure you enable debug mode (then reproduce the problem), and send me your log cat, along with the file in storage/Android/data/com.fieldbook.tracker/cache/log.txt
Images are pulled at roughly 60FPS (max), but its likely slower than that. Images are captured when the virtual shutter or the physical shutter is pressed. Images that are downloaded are native to the camera, and not preview/thumbnails. Images take a few seconds to download.
Moving back to the config activity will disconnect from the API and the AP, which means the user must restart the AP mode and select "Field Book" on their camera.
The current implementation finds the first available storage id. Canon's can have multiple mount points, but only the first is ever used in this implementation.
Following to-do's:
Misc:
fixed a bug in a unit test that was breaking build
added geonav preferences to search indexing in preferences
Type of change
What type of changes does your code introduce? Put an
x
in boxes that apply.CHANGE
(fix or feature that would cause existing functionality to not work as expected)FEATURE
(non-breaking change which adds functionality)BUGFIX
(non-breaking change which fixes an issue)ENHANCEMENT
(non-breaking change which improves existing functionality)NONE
(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Checklist:
Changelog entry