def combine_modbusmap_and_channel(channel_obj, modbus_map):
    """Add the parameters from the modbus map to the channel object."""
    channel_part = modbus_map['1']['addresses']['300']
    for c in channel_part:
        if channel_part[c]['chn'] == channel_obj['name']:
            channel_obj['units'] = channel_part[c]['misc_u']
            try:
                min_max_range = channel_part[c]['r'].split('-')
                channel_obj['min'] = int(min_max_range[0])
                channel_obj['max'] = int(min_max_range[1])
            except Exception:
                channel_obj['min'] = None
                channel_obj['max'] = None
            channel_obj['change'] = float(channel_part[c]['c'])
            channel_obj['guaranteedReportPeriod'] = int(channel_part[c]['grp'])
            channel_obj['minReportTime'] = int(channel_part[c]['mrt'])
            return channel_obj
    return False
