Classes | Functions | Variables
upgrade_firmware Namespace Reference

Classes

class  InvalidFileException
 
class  Packet
 
class  ReadFile
 

Functions

def add8 (a, b)
 
def compute_checksum (bytes)
 
def convert_checksum (checksum, flash_id, row_number, row_size)
 
def convert_num (arr)
 
def crc16_ccitt (bytes)
 
def cstr (x)
 
def file_convert_num (arr)
 
def load_hex (filename)
 
def read__encrypted_flash_line (f)
 
def read__flash_line (f)
 
def read__header (f)
 
def send__data (ser, data_next)
 
def send__encrypted_program_row (ser, flash_id, row_number, data_next)
 
def send__enter_bootloader (ser)
 
def send__erase_row (ser, flash_id, row_number)
 
def send__exit_bootloader (ser)
 
def send__get_application_status (ser, app_number)
 
def send__get_flash_size (ser, flash_id)
 
def send__program_row (ser, flash_id, row_number, data_next)
 
def send__set_active_application (ser, app_number)
 
def send__sync_bootloader (ser)
 
def send__verify_checksum (ser)
 
def send__verify_row (ser, flash_id, row_number)
 
def twos_complement (bytes)
 

Variables

 args = parser.parse_args()
 
dictionary auth_headers = {"Authorization": "Bearer %s" % token}
 
 bootloader_version
 
int bytes_at_a_time = 256
 
 checksum
 
 chunk_size
 
def comp_checksum = send__verify_row(ser, flash_id, row_number)
 
 data
 
 data_length
 
 data_next = data_strip[0:bytes_at_a_time]
 
int data_sent = 0
 
 data_strip = data
 
bool DEBUG = False
 
 default
 
 email = raw_input("Please enter your email address: ").strip()
 
 file_checksum_type
 
 file_silicon_id
 
 file_silicon_rev
 
 flash_first_row
 
 flash_id
 
 flash_last_row
 
 help
 
 hex_stream = None
 
float last_percent = 0.0
 
 parser = argparse.ArgumentParser(description='Ubiquity Robotics Firmware Updater')
 
 path_to_file = args.file
 
 r = requests.post('https://api.ubiquityrobotics.com/token/', json = {'email': email})
 
def real_checksum = convert_checksum(checksum, flash_id, row_number, len(data))
 
list request_bootloader = [0x7E, 0x3E, 0x01, 0x01, 0x01, 0x01, 0x01]
 
 row_number
 
 ser
 
 serial_port = args.device
 
 silicon_id
 
 silicon_rev
 
string TMP_FILE_PATH = '/tmp/firmware'
 
 token = raw_input("Please enter your access token: ").strip()
 
 version = raw_input("What version would you like (press enter for latest): ").strip()
 

Function Documentation

◆ add8()

def upgrade_firmware.add8 (   a,
  b 
)

Definition at line 412 of file upgrade_firmware.py.

◆ compute_checksum()

def upgrade_firmware.compute_checksum (   bytes)

Definition at line 292 of file upgrade_firmware.py.

◆ convert_checksum()

def upgrade_firmware.convert_checksum (   checksum,
  flash_id,
  row_number,
  row_size 
)

Definition at line 415 of file upgrade_firmware.py.

◆ convert_num()

def upgrade_firmware.convert_num (   arr)

Definition at line 145 of file upgrade_firmware.py.

◆ crc16_ccitt()

def upgrade_firmware.crc16_ccitt (   bytes)

Definition at line 305 of file upgrade_firmware.py.

◆ cstr()

def upgrade_firmware.cstr (   x)

Definition at line 182 of file upgrade_firmware.py.

◆ file_convert_num()

def upgrade_firmware.file_convert_num (   arr)

Definition at line 152 of file upgrade_firmware.py.

◆ load_hex()

def upgrade_firmware.load_hex (   filename)

Definition at line 120 of file upgrade_firmware.py.

◆ read__encrypted_flash_line()

def upgrade_firmware.read__encrypted_flash_line (   f)

Definition at line 175 of file upgrade_firmware.py.

◆ read__flash_line()

def upgrade_firmware.read__flash_line (   f)

Definition at line 167 of file upgrade_firmware.py.

◆ read__header()

def upgrade_firmware.read__header (   f)

Definition at line 157 of file upgrade_firmware.py.

◆ send__data()

def upgrade_firmware.send__data (   ser,
  data_next 
)

Definition at line 369 of file upgrade_firmware.py.

◆ send__encrypted_program_row()

def upgrade_firmware.send__encrypted_program_row (   ser,
  flash_id,
  row_number,
  data_next 
)

Definition at line 351 of file upgrade_firmware.py.

◆ send__enter_bootloader()

def upgrade_firmware.send__enter_bootloader (   ser)

Definition at line 324 of file upgrade_firmware.py.

◆ send__erase_row()

def upgrade_firmware.send__erase_row (   ser,
  flash_id,
  row_number 
)

Definition at line 316 of file upgrade_firmware.py.

◆ send__exit_bootloader()

def upgrade_firmware.send__exit_bootloader (   ser)

Definition at line 405 of file upgrade_firmware.py.

◆ send__get_application_status()

def upgrade_firmware.send__get_application_status (   ser,
  app_number 
)

Definition at line 383 of file upgrade_firmware.py.

◆ send__get_flash_size()

def upgrade_firmware.send__get_flash_size (   ser,
  flash_id 
)

Definition at line 333 of file upgrade_firmware.py.

◆ send__program_row()

def upgrade_firmware.send__program_row (   ser,
  flash_id,
  row_number,
  data_next 
)

Definition at line 342 of file upgrade_firmware.py.

◆ send__set_active_application()

def upgrade_firmware.send__set_active_application (   ser,
  app_number 
)

Definition at line 392 of file upgrade_firmware.py.

◆ send__sync_bootloader()

def upgrade_firmware.send__sync_bootloader (   ser)

Definition at line 399 of file upgrade_firmware.py.

◆ send__verify_checksum()

def upgrade_firmware.send__verify_checksum (   ser)

Definition at line 376 of file upgrade_firmware.py.

◆ send__verify_row()

def upgrade_firmware.send__verify_row (   ser,
  flash_id,
  row_number 
)

Definition at line 360 of file upgrade_firmware.py.

◆ twos_complement()

def upgrade_firmware.twos_complement (   bytes)

Definition at line 295 of file upgrade_firmware.py.

Variable Documentation

◆ args

upgrade_firmware.args = parser.parse_args()

Definition at line 33 of file upgrade_firmware.py.

◆ auth_headers

dictionary upgrade_firmware.auth_headers = {"Authorization": "Bearer %s" % token}

Definition at line 72 of file upgrade_firmware.py.

◆ bootloader_version

upgrade_firmware.bootloader_version

Definition at line 443 of file upgrade_firmware.py.

◆ bytes_at_a_time

int upgrade_firmware.bytes_at_a_time = 256

Definition at line 477 of file upgrade_firmware.py.

◆ checksum

upgrade_firmware.checksum

Definition at line 459 of file upgrade_firmware.py.

◆ chunk_size

upgrade_firmware.chunk_size

Definition at line 87 of file upgrade_firmware.py.

◆ comp_checksum

def upgrade_firmware.comp_checksum = send__verify_row(ser, flash_id, row_number)

Definition at line 486 of file upgrade_firmware.py.

◆ data

upgrade_firmware.data

Definition at line 459 of file upgrade_firmware.py.

◆ data_length

upgrade_firmware.data_length

Definition at line 459 of file upgrade_firmware.py.

◆ data_next

upgrade_firmware.data_next = data_strip[0:bytes_at_a_time]

Definition at line 478 of file upgrade_firmware.py.

◆ data_sent

int upgrade_firmware.data_sent = 0

Definition at line 475 of file upgrade_firmware.py.

◆ data_strip

upgrade_firmware.data_strip = data

Definition at line 474 of file upgrade_firmware.py.

◆ DEBUG

bool upgrade_firmware.DEBUG = False

Definition at line 94 of file upgrade_firmware.py.

◆ default

upgrade_firmware.default

Definition at line 31 of file upgrade_firmware.py.

◆ email

upgrade_firmware.email = raw_input("Please enter your email address: ").strip()

Definition at line 50 of file upgrade_firmware.py.

◆ file_checksum_type

upgrade_firmware.file_checksum_type

Definition at line 444 of file upgrade_firmware.py.

◆ file_silicon_id

upgrade_firmware.file_silicon_id

Definition at line 444 of file upgrade_firmware.py.

◆ file_silicon_rev

upgrade_firmware.file_silicon_rev

Definition at line 444 of file upgrade_firmware.py.

◆ flash_first_row

upgrade_firmware.flash_first_row

Definition at line 466 of file upgrade_firmware.py.

◆ flash_id

upgrade_firmware.flash_id

Definition at line 459 of file upgrade_firmware.py.

◆ flash_last_row

upgrade_firmware.flash_last_row

Definition at line 466 of file upgrade_firmware.py.

◆ help

upgrade_firmware.help

Definition at line 31 of file upgrade_firmware.py.

◆ hex_stream

def upgrade_firmware.hex_stream = None

Definition at line 424 of file upgrade_firmware.py.

◆ last_percent

tuple upgrade_firmware.last_percent = 0.0

Definition at line 453 of file upgrade_firmware.py.

◆ parser

upgrade_firmware.parser = argparse.ArgumentParser(description='Ubiquity Robotics Firmware Updater')

Definition at line 30 of file upgrade_firmware.py.

◆ path_to_file

string upgrade_firmware.path_to_file = args.file

Definition at line 45 of file upgrade_firmware.py.

◆ r

upgrade_firmware.r = requests.post('https://api.ubiquityrobotics.com/token/', json = {'email': email})

Definition at line 55 of file upgrade_firmware.py.

◆ real_checksum

def upgrade_firmware.real_checksum = convert_checksum(checksum, flash_id, row_number, len(data))

Definition at line 463 of file upgrade_firmware.py.

◆ request_bootloader

list upgrade_firmware.request_bootloader = [0x7E, 0x3E, 0x01, 0x01, 0x01, 0x01, 0x01]

Definition at line 437 of file upgrade_firmware.py.

◆ row_number

upgrade_firmware.row_number

Definition at line 459 of file upgrade_firmware.py.

◆ ser

upgrade_firmware.ser
Initial value:
1 = serial.Serial(serial_port, 38400, timeout=1, bytesize=8,
2  parity=serial.PARITY_NONE, stopbits=1, xonxoff=0, rtscts=0)

Definition at line 433 of file upgrade_firmware.py.

◆ serial_port

upgrade_firmware.serial_port = args.device

Definition at line 35 of file upgrade_firmware.py.

◆ silicon_id

upgrade_firmware.silicon_id

Definition at line 443 of file upgrade_firmware.py.

◆ silicon_rev

upgrade_firmware.silicon_rev

Definition at line 443 of file upgrade_firmware.py.

◆ TMP_FILE_PATH

string upgrade_firmware.TMP_FILE_PATH = '/tmp/firmware'

Definition at line 27 of file upgrade_firmware.py.

◆ token

upgrade_firmware.token = raw_input("Please enter your access token: ").strip()

Definition at line 65 of file upgrade_firmware.py.

◆ version

string upgrade_firmware.version = raw_input("What version would you like (press enter for latest): ").strip()

Definition at line 67 of file upgrade_firmware.py.

serial::Serial
Definition: serial.h:147


ubiquity_motor
Author(s):
autogenerated on Thu Nov 16 2023 03:30:56