def METHOD_NAME(self, m):
    '''handle an incoming mavlink packet'''
    #do nothing if not caibrating
    if (self.calibrating == False):
        return
    if m.get_type() == 'RC_CHANNELS':
        for i in range(1,self.num_channels+1):
            v = getattr(m, 'chan%u_raw' % i)
            if self.get_cal_min(i) > v:
                self.set_cal_min(i,v)
                self.console.writeln("Calibrating: RC%u_MIN=%u" % (i, v))
            if self.get_cal_max(i) < v:
                self.set_cal_max(i,v)
                self.console.writeln("Calibrating: RC%u_MAX=%u" % (i, v))