Skip to content
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

Comment out iso_to_av96 and update cython version #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lazzarello
Copy link

Two build issues

  1. The Kivy of today depends on a newer version of cython. Update it.
  2. The chdkptp.py upstream HEAD has a different API than the one included in the Rpi image

The first exception is the method name iso_to_sv96 has been changed to iso_to_av96. I updated the method call and expected it to just work. Then I got a new exception when calling the updated method.

>>> chdkptp.util.iso_to_av96(100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/chdkptp/util.py", line 7, in iso_to_av96
    return global_lua.globals.exposure.iso_to_av96(iso)
TypeError: 'NoneType' object is not callable

I searched through the pi-scan codebase for the string svm and it doesn't appear anywhere except in this option dict, which I think is trying to set the ISO to a value of 100. I commented this out and things are working as expected.

I would like to bring the API up to date but it's not directly related to my project. If it's cool with you the comment seems to fix the functionality on my end.

@duerig
Copy link
Contributor

duerig commented Apr 10, 2017

Take a look at my chdkptp.py fork here:

https://github.com/duerig/chdkptp.py/commits/master

This (and the other commit) are essential bugfixes. I meant to make a PR for Johannes, but I see that I have forgotten. Now that is rectified here: jbaiter/chdkptp.py#5

The iso_to_av96 thing isn't an interface change. It was just a bug in the original code. If we don't set ISO at all, then the quality of the resulting image will be reduced. When I was playing around with this, fixing the bug made a significant difference to apparent graininess.

I'm also working on integrating the build script into the new pi-gen script that generates Raspberry Pi images. I should have that done this week. I'll pull in your build change to that.

@duerig
Copy link
Contributor

duerig commented Apr 10, 2017

Johannes as now accepted my pull request fixing the chdkptp.py bug. So pull the latest version from him, revert that line, and things should work.

Regarding falling back to the local filesystem: most Pi Scan installations are running on read-only filesystems. An overlay makes them look read-writable but any changes will disappear on reboot and writing to them consumes RAM. So for your fallback to work consistently on other installations, it needs to check for this case and only fallback if the local filesystem is truly read-writable and not just a copy-on-write ramdisk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants