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

PwM thread does not stop gracefully when example exists #29

Open
theyoyojo opened this issue Jun 17, 2020 · 0 comments
Open

PwM thread does not stop gracefully when example exists #29

theyoyojo opened this issue Jun 17, 2020 · 0 comments
Labels
Software Engineering/Bug Something isn't working

Comments

@theyoyojo
Copy link
Contributor

will update with reproducer

@theyoyojo theyoyojo added the Software Engineering/Bug Something isn't working label Jun 17, 2020
theyoyojo added a commit that referenced this issue Jun 17, 2020
changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- add try except structure
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	requirements.txt:
	- update with latest output of pip freeze from my virtualenv,
	  however this _may_ be bloat

	spec/spec.tex:
	- fix some typos
	- add entry for channel_valid_or_die
	- update some of the technical spec

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
theyoyojo added a commit that referenced this issue Jun 17, 2020
changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- add try except structure
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	requirements.txt:
	- update with latest output of pip freeze from my virtualenv,
	  however this _may_ be bloat

	spec/spec.tex:
	- fix some typos
	- add entry for channel_valid_or_die
	- update some of the technical spec

	spec/spec.pdf:
	- regenerate document

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
theyoyojo added a commit that referenced this issue Jun 17, 2020
changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- add try except structure
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	requirements.txt:
	- update with latest output of pip freeze from my virtualenv,
	  however this _may_ be bloat

	spec/spec.tex:
	- fix some typos
	- tweak style and title
	- add entry for channel_valid_or_die
	- update some of the technical spec

	spec/sources.bib:
	- replace \url with \textt

	spec/spec.pdf:
	- regenerate document with 1 inch margins

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
theyoyojo added a commit that referenced this issue Jun 18, 2020
changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- add try except structure
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	spec/spec.tex:
	- fix some typos
	- tweak style and title
	- add entry for channel_valid_or_die
	- update some of the technical spec

	spec/sources.bib:
	- replace \url with \textt

	spec/spec.pdf:
	- regenerate document with 1 inch margins

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
theyoyojo added a commit that referenced this issue Jun 19, 2020
changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- possible issue: takes two Ctl+C's to stop
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	spec/spec.tex:
	- fix some typos
	- tweak style and title
	- add entry for channel_valid_or_die
	- update some of the technical spec

	spec/sources.bib:
	- replace \url with \textt

	spec/spec.pdf:
	- regenerate document with 1 inch margins

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
theyoyojo added a commit that referenced this issue Jun 19, 2020
changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- possible issue: takes two Ctl+C's to stop
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	spec/spec.tex:
	- fix some typos
	- tweak style and title
	- add entry for channel_valid_or_die
	- update some of the technical spec

	spec/sources.bib:
	- replace \url with \texttt

	spec/spec.pdf:
	- regenerate document with 1 inch margins

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
theyoyojo added a commit that referenced this issue Jun 19, 2020
… and much, much more (#27)

* Add support for software Pulse-width Modulation (PwM) on all channels

summary of updates in this patch:
	pwm:
	- implement PwM interface as per spec
	- implement basic software PwM functionality
	- add logic tests for PwM interface
	- extend threading object hierarchy to integrate PwM thread
		control with existing thread control flow logic
		this includes remaming _PollThread as _LineThread
	- add _line_thread_* thread type constants
	- add thread_{stop,start} interface to _Line to avoid direct
		manipulation of _LineThread
	- add dutycycle and frequency fields to class _Line
	- update spec to reflect new internal changes (in line_* interface)
	- bump spec revision number to 2
	- s/line_start_poll/line_poll_start/g
	- add dictionary mapping thread types to thread entry points

	examples:
	- fix broken examples
	- add flashing light example
	- deprecate morese code example
	- remove old wrap.py prototype
	- fix and enforce style in examples
	- set executable bit on all examples

	misc:
	- add a note about notes.sh to README
	- add header to RPi/_GPIO
	- mention that the project is free software in the README and header
	- export the PWM name in RPi/GPIO/__init__.py for access via GPIO name
	- s/is_all_bools/is_all_bools_or_directions/g
		this function now returns True when GPIO.HIGH or GPIO.LOW
		are the data or in the list
	- fix GPIO.HIGH and GPIO.LOW all being interpreted as True by output()
	- remove the directory named 'misc' that contained files
		to reproduce a random bug and should not have been
		in the master branch
	- fix test-style.sh not scanning tests and examples
	- fix a lot of style errors in the tests
	- replace some magic numbers with hopefully more descriptive constants
	- remove large ascii art TODO and redundant comments at the top of _GPIO.py

	tl;dr: Anyway, here's software PwM

Signed-off-by: Joel Savitz <[email protected]>

* add missing constants (#24)

Signed-off-by: Joel Savitz <[email protected]>

* add script to enable non-root access to gpio pins

Signed-off-by: Joel Savitz <[email protected]>

* Rename SPECS directory to packaging to fix (#22)

this directory is for files that pertain to distro-specific packaging

Signed-off-by: Joel Savitz <[email protected]>

* Integrate a number of existing RPi.GPIO API examples and much more

changes in this patch:
	.coveragerc:
	- report coverage information on RPi/core.py instead
	  of RPi/_GPIO.py due to file name change

	Makefile:
	- %s/unit-cov/test-cov/g
	- removed an extraneous comment

	RPi/GPIO/__init__.py:
	RPi/GPIO_DEVEL/__init__.py:
	- Added header docstrings
	- formatted and sorted API imports

	RPi/_GPIO.py -> RPi/core.py:
	- File renamed to clarify purpose
	- convert header to docstring format
	- sort and organize functions and constants
	- fix documentation errors and gramatical mistakes
	- add automatic invokation of cleanup() at interpreter exit
	- add RPi.GPIO.{RPI_INFO, RPI_REVISION, VERSION} constants
	- fix various cases of mishandling of iterable channel and value
	  lists
	- fix pwm thread never releasing lock if thread dies due to
	  exception when the main thread revokes access, however I
	  suspect that this actually be a surface fix for another bug,
	  will look into further (#29)
	- small tweaks to improve modularity
	- add support for single value and iterable lists of values for
	  RPi.GPIO.cleanup()
	- allow PwM to successfully start without explicitly setting up
	  a channel as an output because this library has a more relaxed
	  attitude about those things
	- add warn on invalid call to PWM.start()
	- fix board numbering mode being actually pretty broken due to
	  inconsistent mishandling of channel inputs of various forms
	- fix line_get_value being actually very broken and not
	  retuning anything and therefore always returning None
	- fix gpio_function() being actually entirely broken so it
	  returns the current function representing what is going on on
	  a GPIO channel as RPi.GPIO would, but this requires further
	  testing (#30)
	- fix RPi.GPIO.PWM.start() not returning the truth of whether a
	  PwM thread has been successfully started or not

	examples/callback2.py:
	- add shabang

	examples/flash18.py:
	- remove debuginfo output toggle

	examples/input_examples.py:
	examples/output_examples.py:
	examples/pwm2.py:
	examples/pwm_usage.py:
	examples/random_usage.py:
	examples/try_import.py:
	- copy example code from Ben Croston's RPi.GPIO wiki on
	  sourceforge
	- see the files for the sources
	- ensure that the code works with this library. I found quite a
	  few bugs integrating these files
	- fix a few mistakes in the code
	- fix style

	examples/morse.py:
	- update morse code to current API version
	- add basic input validation
	- fix style

	examples/pwm.py:
	- renamed to pwm1.py for consistency

	examples/pwm1.py:
	- possible issue: takes two Ctl+C's to stop
	- this may be revelvant to (#29)

	examples/pwm3.py:
	examples/pwm4.py:
	- Copy example code from some forum
	- see the files for the sources

	non_root_permission.sh:
	- expand note on lack of persistence of effects post reboot

	spec/spec.tex:
	- fix some typos
	- tweak style and title
	- add entry for channel_valid_or_die
	- update some of the technical spec

	spec/sources.bib:
	- replace \url with \texttt

	spec/spec.pdf:
	- regenerate document with 1 inch margins

	test-style.sh:
	- scan RPi/core.py instead of RPi/_GPIO.py due to name change
	- add scan of examples/morese.py since it is again working

	tests/test_gpio.py:
	- style tweaks
	- fix test_gpio_function by making it actually test for the
	  feature that now is possibly implemented correctly
	- modify test_setdebug info to turn it off before the next call
	  to Reset to avoid printing a lot of text to the terminal
	- extend test_cleanup to validate the new features of cleanup()

	tests/test_pwm.py:
	- more thoroughly test PWM.start()

Signed-off-by: Joel Savitz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Software Engineering/Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant