 int SECONDARY_SIGNAL_MAX = 1750;
 int SECONDARY_SIGNAL_DURATION_MS = 2200;
 int secondary_signal_timestep_ms;
+boolean secondarySignalDone=false;
 unsigned int secondary_signal_next_time_ms;
 int secondary_signal_value;
 

int MAIN_SIGNAL_MAX = 1750;
int MAIN_SIGNAL_DURATION_MS = 2200;
int main_signal_timestep_ms;
unsigned int main_signal_next_time_ms;
int main_signal_value;




void perhaps_update_secondary_signal() {
  if (millis() > secondary_signal_next_time_ms && !secondarySignalDone) {
    secondary_signal_value++;
    if (secondary_signal_value > SECONDARY_SIGNAL_MAX) {
      secondarySignalDone=true;
      secondary_signal.detach();
      return;
    }
    secondary_signal_next_time_ms += secondary_signal_timestep_ms;
    secondary_signal.writeMicroseconds(secondary_signal_value);
