after looking at it a few times i _think_ i have it right…
the actual port open happens in between these statements the action of these statements is to display the pre_upload prompt (not open port!)
so sequence is: 1. if open_port_before_upload_prompt is False, then display pre_upload prompt 2. open port 3. if open_port_before_upload_prompt is True, then display pre_upload prompt
At first glance it is sort of confusing, but the reasoning for this approach was because it was the most straightforward, minimalist way i could think to do this without revamping the entire section. (I just got the logic backwards - at least i think its right this time.)
oh well, now that you got me thinking, perhaps the symbol name should be: display_pre_upload_prompt_before_port_open? maybe this would make it more straightforward (albeit a bit verbose, which imho would be preferred for maintainability and comprehensibility).
Have you already committed the related previous patch? Thoughts?
________________________________ From: Dan Smith dsmith@danplanet.com To: chirp_devel@intrepid.danplanet.com Sent: Wednesday, February 5, 2014 6:50 PM Subject: Re: [chirp_devel] [PATCH] fix bad cable errors for some users on upload #1397 (2)
- if prompts.open_port_before_upload_prompt == True: - print "Opening port before pre_upload prompt." + + if prompts.open_port_before_upload_prompt == False: + print "Opening port after pre_upload prompt." self._show_instructions(radio, prompts.pre_upload)
I'm confused. This looks wrong to me. "If open_before is False, then open (before)"
- if prompts.open_port_before_upload_prompt == False: - print "Opening port after pre_upload prompt." + if prompts.open_port_before_upload_prompt == True: + print "Opening port before pre_upload prompt." self._show_instructions(radio, prompts.pre_upload)
"If open_before is true, then open (after)".
Didn't you have it right the first time?
--Dan
_______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers