Merge from upstream#5
Merged
tcwan merged 42 commits intotcwan:mastertcwan/nxt-python:masterfrom Jun 13, 2018
Merged
Conversation
The loop "for s in find_bricks(host, name, silent, method):" was indented one level too much so it was only executed when debug = True. And some more debug print lines.
...and adapt nxtfilemgr accordingly
"Surround top-level function and class definitions with two blank lines." https://www.python.org/dev/peps/pep-0008/#blank-lines
Fix nxt_test when --verbose option is NOT given
This fixes the error:
TypeError: ord() expected string of length 1, but int found
when connecting via Bluetooth
Tested working on Linux.
Closes #124
this tells git to ignore the __pycache__ directory that can be automatically created by python if you use the nxt module directly e.g. via PYTHONPATH
Fantom driver support has been removed, so remove all of the remaining reference to it.
This improves the config file parsing of the method property. It fixes possible code injection via eval() as well as makes parsing a bit more robust by filtering out invalid values, such as the obsolete fantom driver values. Fixes #137
The port numbers (PORT_* values) are 0-based, however the actual port numbers printed on the NXT are 1-based. So, add one so that the user sees the port number printed on the NXT.
Since strings in python3 are UTF-8, calling chr() on an I2C address >= 0x80 would create an invalid UTF-8 character (0x80 to 0xFF are illegal). Then later, when encode() was called in add_string(), a UnicodeEncodeError exception would be thrown because of this. This adds a new add_bytes() method to the Telegram class for adding bytes objects. Then, this new method is used in ls_write() so that we can pass arbitrary I2C addresses without error.
NXT Temperature Sensor
fix off by one in I2C error message
Rewritten to remove eval()
fix TypeError when connecting via Bluetooth
Drop remaining references to fantom
add .gitignore to ignore __pycache__
This fixes an exception when there is not config file. The changes from commit cad30b1 introduced this error.
This fixes a TypeError (probably caused by python 2>3 conversion) using the devsock connection on macOS.
also ignore *.pyc files
Fix TypeError when using devsock connection
fix crash when no config file
Fixes for nxtfilemgr
bluesock: teach BlueSock init about debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pick up fixes from upstream