volatile char cableRelease(char key, char first) { static char status; //, cable; if(first) { status = 0; //cable = 0; lcd.cls(); menu.setTitle(TEXT("Cable Remote")); menu.setBar(TEXT("Bulb"), TEXT("Photo")); lcd.update(); timer.half(); } if(key == FL_KEY) { if(status != 1) { status = 1; lcd.eraseBox(8, 18, 8 + 6 * 11, 26); lcd.writeString(8, 18, TEXT("(BULB OPEN)")); timer.bulbStart(); lcd.update(); } else { status = 0; lcd.eraseBox(8, 18, 8 + 6 * 11, 26); timer.bulbEnd(); lcd.update(); } } else if(key == FR_KEY && status != 1) { status = 0; lcd.eraseBox(8, 18, 8 + 6 * 11, 26); timer.capture(); lcd.update(); } else if(key != 0) { status = 0; lcd.eraseBox(8, 18, 8 + 6 * 11, 26); timer.half(); lcd.update(); } /* if(timer.cableIsConnected()) { if(cable == 0) { cable = 1; lcd.writeStringTiny(6, 28, TEXT("Cable Connected")); lcd.update(); } } else { if(cable == 1) { cable = 0; lcd.eraseBox(6, 28, 6 + 15 * 5, 36); lcd.update(); } } */ if(key == LEFT_KEY) { timer.off(); return FN_CANCEL; } return FN_CONTINUE; }
volatile char shutterTest(char key, char first) { static char status, cable; if(first) { status = 0; cable = 0; lcd.cls(); menu.setTitle(TEXT("Shutter Test")); menu.setBar(TEXT("Half"), TEXT("Full")); lcd.update(); } if(key == FL_KEY && status != 1) { status = 1; lcd.eraseBox(20, 18, 20 + 6 * 6, 26); lcd.writeString(20, 18, TEXT("(HALF)")); timer.half(); lcd.update(); } else if(key == FR_KEY && status != 2) { status = 2; lcd.eraseBox(20, 18, 20 + 6 * 6, 26); lcd.writeString(20, 18, TEXT("(FULL)")); timer.full(); lcd.update(); } else if(key != 0) { status = 0; lcd.eraseBox(20, 18, 20 + 6 * 6, 26); timer.off(); lcd.update(); } if(timer.cableIsConnected()) { if(cable == 0) { cable = 1; lcd.writeStringTiny(6, 28, TEXT("Cable Connected")); lcd.update(); } } else { if(cable == 1) { cable = 0; lcd.eraseBox(6, 28, 6 + 15 * 5, 36); lcd.update(); } } if(key == LEFT_KEY) return FN_CANCEL; return FN_CONTINUE; }