BrewPi / firmware

Brewing temperature control firmware for the BrewPi Spark (Particle Photon inside)
http://www.brewpi.com
GNU Affero General Public License v3.0
97 stars 55 forks source link

Blank Arduino Cannot Program using Legacy Branch #44

Closed fuzzewuzze closed 8 years ago

fuzzewuzze commented 8 years ago

Line 636 of BrewPi.py calls bg_ser.stop and fails when programming a blank Arduino using the Legacy branch.

Looking at the code, bg_ser is of type None and does not get defined on line 374 unless there is a detected hwVersion.
So right now its only possible to Re-Program Arduinos that have an existing hwVersion and trigger that code to create the BackGroundSerial instance, if the hwVersion is none because its a new Arduino its impossible to flash.

Some additional logic is required i think to check in the ProgramArduino/ProgramController case to ensure bg_ser is not null.

elcojacobs commented 8 years ago

This has been fixed.