def cmd_rally_alt(self, args):
        '''handle rally alt change'''
        if (len(args) < 2):
            print("Usage: rally alt RALLYNUM newAlt <newBreakAlt>")
            return
        if not self.have_list:
            print("Please list rally points first")
            return

        idx = int(args[0])
        if idx <= 0 or idx > self.rallyloader.rally_count():
            print("Invalid rally point number %u" % idx)
            return

        new_alt = int(args[1])
        new_break_alt = None
        if (len(args) > 2):
            new_break_alt = int(args[2])

        self.rallyloader.set_alt(idx, new_alt, new_break_alt)
        self.send_rally_point(idx-1)
        self.fetch_rally_point(idx-1)
        self.rallyloader.reindex()
def cmd_rally_alt ( self , args ) : if ( len ( args ) < 2 ) : print ( "Usage: rally alt RALLYNUM newAlt <newBreakAlt>" ) return if not self . have_list : print ( "Please list rally points first" ) return idx = int ( args [ 0 ] ) if idx <= 0 or idx > self . rallyloader . rally_count ( ) : print ( "Invalid rally point number %u" % idx ) return new_alt = int ( args [ 1 ] ) new_break_alt = None if ( len ( args ) > 2 ) : new_break_alt = int ( args [ 2 ] ) self . rallyloader . set_alt ( idx , new_alt , new_break_alt ) self . send_rally_point ( idx - 1 ) self . fetch_rally_point ( idx - 1 ) self . rallyloader . reindex ( )
handle rally alt change