In this paper, a closed-loop snitching function for on-off thruster firings is proposed to provide good attitude control performance in the presence of modeling errors for single-axis slew maneuver of a rigid spacecraft and to eliminate double-sided thruster firings. The size of a single-sided deadband in the switching function provides the capability of a tradeoff between maneuver time and fuel expenditure. The application of this switching function for the single-axis slew maneuvers of flexible spacecraft is also analyzed. The analytical simulations and experimental results demonstrate that the proposed switching function provides significant improvement in the slew maneuver performance.