Repository navigation
fix - IR receiver on Stretch - #295
Conversation
There was a problem hiding this comment.
Instead of using try/excepts everywhere, couldn't we have just one function where we check if the script runs with Python 2 or 3 and then decide to use encode or not?
The name of the function should be like encodeOrNot - I think this is a good name.
Even better than using try/excepts to detect the version of Python, we could use sys.version_info.major to get the major version of it.
|
I thought about going with a method but I didn't want to hide the fact that it was a socket call. |
* Remove i2c_mutex, it is now residing in script_tools (#287) * Feature/easygopigo refactoring (#288) * read_position_str() is also needed here to keep in sync with easygopigo3 * Add init_<sensor> methods to the easygopigo class so the two robots are kept in sync * add vscode to .gitignore * Feature/systemwide mutex (#290) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Bug/line follower + overall mutex (#291) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Fix import line to its more generic form * Fix/overallmutexcheck (#292) * read_position_str() is also needed here to keep in sync with easygopigo3 * Query overallmutex flag every single time * fix - remove arduino support (#293) * fix - IR receiver on Stretch (#295) fix - IR receiver on Stretch * make IR Receiver in easygopigo Python3 ready (#298)
* Fix Mutex update (#303) * flip develop to master branch for DexterOS (#304) * Remove i2c_mutex, it is now residing in script_tools (#287) * Feature/easygopigo refactoring (#288) * read_position_str() is also needed here to keep in sync with easygopigo3 * Add init_<sensor> methods to the easygopigo class so the two robots are kept in sync * add vscode to .gitignore * Feature/systemwide mutex (#290) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Bug/line follower + overall mutex (#291) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Fix import line to its more generic form * Fix/overallmutexcheck (#292) * read_position_str() is also needed here to keep in sync with easygopigo3 * Query overallmutex flag every single time * fix - remove arduino support (#293) * fix - IR receiver on Stretch (#295) fix - IR receiver on Stretch * make IR Receiver in easygopigo Python3 ready (#298)
* Remove i2c_mutex, it is now residing in script_tools (#287) * Feature/easygopigo refactoring (#288) * read_position_str() is also needed here to keep in sync with easygopigo3 * Add init_<sensor> methods to the easygopigo class so the two robots are kept in sync * add vscode to .gitignore * Feature/systemwide mutex (#290) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Bug/line follower + overall mutex (#291) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Fix import line to its more generic form * Fix/overallmutexcheck (#292) * read_position_str() is also needed here to keep in sync with easygopigo3 * Query overallmutex flag every single time * fix - remove arduino support (#293) * fix - IR receiver on Stretch (#295) fix - IR receiver on Stretch * make IR Receiver in easygopigo Python3 ready (#298) * Sync master into develop (#305) * Fix Mutex update (#303) * flip develop to master branch for DexterOS (#304) * Remove i2c_mutex, it is now residing in script_tools (#287) * Feature/easygopigo refactoring (#288) * read_position_str() is also needed here to keep in sync with easygopigo3 * Add init_<sensor> methods to the easygopigo class so the two robots are kept in sync * add vscode to .gitignore * Feature/systemwide mutex (#290) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Bug/line follower + overall mutex (#291) * read_position_str() is also needed here to keep in sync with easygopigo3 * support systemwide mutex * Fix import line to its more generic form * Fix/overallmutexcheck (#292) * read_position_str() is also needed here to keep in sync with easygopigo3 * Query overallmutex flag every single time * fix - remove arduino support (#293) * fix - IR receiver on Stretch (#295) fix - IR receiver on Stretch * make IR Receiver in easygopigo Python3 ready (#298) * feature - take line follower out (#306) * feature - take the line follower install functions out * feature - remove line follower files * feature - make modifications to accomodate di_sensors instead * feature - change to di_sensors paths * feature - change path due to the presence of a new setup.py * feature - change paths to DI_Sensors * feature - add in a function and use regular imports for line_follower * feature - change the way the install script installs the robot (#308) * feature - add in bulk changes to the installer scripts * feature - redefining variables and procedures in install script * feature - add function for installing a python package and other stuff * feature - changing just a comment * feature - change when to exit based on what executable is present * feature - revert a check for git presence * feature - exit installer if script_tools fails * feature - go without using pip for installing large packages * feature - fix errors during installation phase * feature - uninstall python packages directly without pip * feature - fix syntax error in bash for if statement * feature - skipping the installation of Adafruit_DHT - too much time * feature - add avrdude & make temp file hidden * feature - make sure the Dexter folder can be created & add REAMDE * feature - make the same changes as on the grovepi * feature - make the same changes to install.sh as on the GrovePi * feature - fix lingering syntax issues * feature - correct bad path to setup folder on gopigo * feature - remove space echoes * feature - yet again remove space echoes in install script * feature - add source for 2 functions for avr installer * feature - replacing "aborting" with "exiting" * feature - check if script is run with pi user * feature - correct name of installer * feature - fix global variable issue * feature - change how the installation script goes * feature - slight grammatical change in readme * feature - change sources for install script (#309) * feature - add in bulk changes to the installer scripts * feature - redefining variables and procedures in install script * feature - add function for installing a python package and other stuff * feature - changing just a comment * feature - change when to exit based on what executable is present * feature - revert a check for git presence * feature - exit installer if script_tools fails * feature - go without using pip for installing large packages * feature - fix errors during installation phase * feature - uninstall python packages directly without pip * feature - fix syntax error in bash for if statement * feature - skipping the installation of Adafruit_DHT - too much time * feature - add avrdude & make temp file hidden * feature - make sure the Dexter folder can be created & add REAMDE * feature - make the same changes as on the grovepi * feature - make the same changes to install.sh as on the GrovePi * feature - fix lingering syntax issues * feature - correct bad path to setup folder on gopigo * feature - remove space echoes * feature - yet again remove space echoes in install script * feature - add source for 2 functions for avr installer * feature - replacing "aborting" with "exiting" * feature - check if script is run with pi user * feature - correct name of installer * feature - fix global variable issue * feature - change how the installation script goes * feature - slight grammatical change in readme * feature - change sources * rewrite Control Panel (#310) * write Control Panel * Fix GUI related to trimming * feature - change script_tools reference (#311) * write Control Panel * Fix GUI related to trimming * feature - change script_tools reference * use direct links instead of redirects
NOTE: the IR sensor still doesn't work
Make files python 3 ready.
Reorganise ir_receiver.py so that functions are at the top, and not in the middle of the code, and all constants are together.
Handle cases where we get a byte back instead of a string.