Man charged after shooting at police