 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;
 



void perhaps_update_secondary_signal() {
  if (millis() > secondary_signal_next_time_ms) {
    secondary_signal_value += 1;
    if (secondary_signal_value > SECONDARY_SIGNAL_MAX) {
      secondary_signal.detach();
    }
    secondary_signal_next_time_ms += secondary_signal_timestep_ms;
    secondary_signal.writeMicroseconds(secondary_signal_value);



void perhaps_update_main_signal() {
  if (millis() > main_signal_next_time_ms && !mainSignalDone) {
    main_signal_value++;
    if (main_signal_value > MAIN_SIGNAL_MAX) {
      mainSignalDone=true;
      main_signal.detach();
      return;
    }
    main_signal_next_time_ms += main_signal_timestep_ms;
    main_signal.writeMicroseconds(main_signal_value);
