You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python doesn't seem to want to exit with no exit code. Which is convenient, because I actually need better semantic exit codes in order for this to wire up to Tulip nicely :)
What I need is a list of exit codes that mean specific things. There are a few reasons that this script would fail, and Tulip needs to know a little more about why it does so. At minimum, the script should report back one code when avrdude fails and another when usage is incorrect. More testing would be needed to determine whether there are other exit conditions that need to be tracked, but our current Tulip process does look for avrdude's exit code when it calls that directly and i'd like to be able to continue that practice. Better yet, we should look at the different ways that avrdude fails (not connected to a radio in the first place, verification fails, wrong programmer specified) and see if any of them are worth reporting back to Tulip.
Full output here:
`pi@TPR-0:~/ops_tools $ python program_radio.py
program_radio.py:39: RuntimeWarning: A physical pull up resistor is fitted on this channel!
GPIO.setup(2, GPIO.IN, pull_up_down=GPIO.PUD_UP)
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9108 (probably t25)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex"
avrdude: input file /home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex auto detected as Intel Hex
avrdude: writing flash (1454 bytes):
Python doesn't seem to want to exit with no exit code. Which is convenient, because I actually need better semantic exit codes in order for this to wire up to Tulip nicely :)
What I need is a list of exit codes that mean specific things. There are a few reasons that this script would fail, and Tulip needs to know a little more about why it does so. At minimum, the script should report back one code when
avrdude
fails and another when usage is incorrect. More testing would be needed to determine whether there are other exit conditions that need to be tracked, but our current Tulip process does look for avrdude's exit code when it calls that directly and i'd like to be able to continue that practice. Better yet, we should look at the different ways that avrdude fails (not connected to a radio in the first place, verification fails, wrong programmer specified) and see if any of them are worth reporting back to Tulip.Full output here:
`pi@TPR-0:~/ops_tools $ python program_radio.py
program_radio.py:39: RuntimeWarning: A physical pull up resistor is fitted on this channel!
GPIO.setup(2, GPIO.IN, pull_up_down=GPIO.PUD_UP)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9108 (probably t25)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex"
avrdude: input file /home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex auto detected as Intel Hex
avrdude: writing flash (1454 bytes):
Writing | ################################################## | 100% 0.61s
avrdude: 1454 bytes of flash written
avrdude: verifying flash memory against /home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex:
avrdude: load data flash data from input file /home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex:
avrdude: input file /home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex auto detected as Intel Hex
avrdude: input file /home/pi/ops_tools/data/3044a9415d9b2becb2ee44bd759a0c9f6be66109.hex contains 1454 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.50s
avrdude: verifying ...
avrdude: 1454 bytes of flash verified
avrdude: reading input file "/home/pi/ops_tools/temp/eeprom"
avrdude: input file /home/pi/ops_tools/temp/eeprom auto detected as Intel Hex
avrdude: writing eeprom (32 bytes):
Writing | ################################################## | 100% 0.04s
avrdude: 32 bytes of eeprom written
avrdude: verifying eeprom memory against /home/pi/ops_tools/temp/eeprom:
avrdude: load data eeprom data from input file /home/pi/ops_tools/temp/eeprom:
avrdude: input file /home/pi/ops_tools/temp/eeprom auto detected as Intel Hex
avrdude: input file /home/pi/ops_tools/temp/eeprom contains 32 bytes
avrdude: reading on-chip eeprom data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: 32 bytes of eeprom verified
avrdude: safemode: Fuses OK (E:FF, H:DF, L:62)
avrdude done. Thank you.
Traceback (most recent call last):
File "program_radio.py", line 47, in
exit()
TypeError: 'int' object is not callable
pi@TPR-0:~/ops_tools $ `
The text was updated successfully, but these errors were encountered: