    byte maxsequence;
    byte lastfilenum;  // the last file we loaded or saved
    byte tr_seq_pos;   // the current index into the treadle sequence for that file
-   byte unused[15];
+   byte tr_treadle;   // the current treadle (could be 0/1 for "alternate tabby" mode)
+   byte unused[14];
    // after this we write the "shaft_status" array, which contains the current shaft configuration data
 } config_hdr = {0 };
 #define CONFIG_SIZE ((int)sizeof(config_hdr) + (int)sizeof(shaft_status))

   if (wait_yesno("shed must be closed", "do calibration?"))
      do_calibration();
   Serial.println("weaving");
   lcd.clear();
   lcd.blink();
   display_treadle_sequence(config_hdr.tr_seq_pos, false);  // show the position we are about to move to
   lcd.setCursor(0, 0);  // indicate that by putting the cursor before the sequence number
   led7_shownum(shuttle_count, true);
   while (1) {// do the treadle sequence forever
      V_LED(V_ENC_BLUE); // signal "ok to change rows"
      event = check_event();
      switch (event) {
         case ePB1:  // any other button stops the weaving
         case ePB2:
         case ePB3:
            lcd.noBlink();

      lcd.setCursor(0, row);
      lcd_write_dd(sequence_pos + 1);
      if (treadle != UNUSED_SEQ) {
         if (file_hdr.flags & FILE_TABBY) { // show tabby in addition to real treadle
            int tabby_posn = sequence_pos & 1 ? 1 : 0;  // alternate even/odd
            lcd.setCursor(tabby_posn + 3, row);
            lcd.write(treadle_name[tabby_posn]); }
         lcd.setCursor(treadle + 3, row);
         lcd.write(treadle_name[treadle]); } } }

enum events program_tieups(void) {
   // program the treadle-lamm tieups, and return the button push that caused us to stop
   int shaft_num_on_bottom = 0;
   int shaft_num = 0, treadle_num = 0;
   bool show_title = true;
