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

Print warning or ask when arduino dir is not found. #31

Open
elcojacobs opened this issue Mar 31, 2014 · 0 comments
Open

Print warning or ask when arduino dir is not found. #31

elcojacobs opened this issue Mar 31, 2014 · 0 comments

Comments

@elcojacobs
Copy link
Member

Our policy is to load the tool locations from the config file, but when they are not set assume default locations.

If these default locations don't have the tools, we should warn, print the issue at hand and how to correct it (instructions to edit config.cfg), instead of crashing.

Relevant piece of code:
https://github.com/BrewPi/brewpi-script/blob/master/programArduino.py#L66

Current behavior:

result of invoking avrdude:
/bin/sh: 1 arduinohome/hardware/tools/avrdude: not found

The script continues , gives the countdown,etc. and eventually tells me that it "Cannot receive version number".

Or:

When I try with programArduinoFirstTime.py ...

**** Arduino Program script started ****

Settings will be restored if possible

Devices will be restored if possible

Checking old version before programming.

Warning: Cannot receive version number from Arduino. Your Arduino is either not programmed yet or running a very old version of BrewPi. Arduino will be reset to defaults.

Loading programming settings from board.txt

Checking hex file size with avr-size...

Traceback (most recent call last):
File "programArduinoFirstTime.py", line 39, in
result = programmer.programArduino(config, boardType, hexFile, {'settings': True, 'devices': True})
File "/home/brewpi/programArduino.py", line 171, in programArduino
' bytes out of max ' + boardSettings['upload.maximum_size']))
KeyError: 'upload.maximum_size'

Reported here:
http://forum.brewpi.com/discussion/553/need-help-programming-arduino

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

No branches or pull requests

1 participant