Download the file
  1. #include "camera.h"
  2. #include "items.h"
  3. #include "digital_input.h"
  4.  
  5. extern Option shutter_option;
  6. extern Option focus_option;
  7. extern Count flash_duration;
  8.  
  9. void Camera::open_shutter(uint8_t step) {
  10. if (shutter_option.get_value() == step) {
  11. if (focus_option.get_value() == FOCUS_YES)
  12. focus.high();
  13. shutter.high();
  14. }
  15. }
  16.  
  17. void Camera::shoot() {
  18. flash.high();
  19. delay(flash_duration.get_value());
  20. flash.low();
  21. }
  22.  
  23. void Camera::close_shutter() {
  24. shutter.low();
  25. if (focus_option.get_value() == FOCUS_YES)
  26. focus.low();
  27. }
  28.  
  29. // vim:ft=arduino
  30.