pass camera connection to scenerunner()

This commit is contained in:
Ronald Schaten 2022-02-10 15:14:28 +01:00
parent df80dfe5c1
commit 97398cffd7
3 changed files with 7 additions and 3 deletions

View File

@ -62,7 +62,7 @@ BasicStepperDriver stepper(STEPPER_STEPS, PIN_STEPPER_DIR, PIN_STEPPER_STEP);
enum State { STATE_MENU, STATE_JOG, STATE_RUN };
State state = STATE_MENU;
Scenerunner scenerunner(&lcd, &stepper);
Scenerunner scenerunner(&lcd, &stepper, PIN_CAMERA_FOCUS, PIN_CAMERA_SHUTTER);
// ===
// Order of menu entries looks chaotic. It makes sense on screen.

View File

@ -4,9 +4,11 @@
#include "Scenerunner.h"
Scenerunner::Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper) {
Scenerunner::Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper, int pin_focus, int pin_shutter) {
_lcd = lcd;
_stepper = stepper;
_pin_focus = pin_focus;
_pin_shutter = pin_shutter;
}
void Scenerunner::nextAction(){

View File

@ -19,12 +19,14 @@ class Scenerunner {
int nSteps = 10;
float distance = 0.5;
Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper);
Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper, int pin_focus, int pin_shutter);
void nextAction();
private:
LiquidCrystal *_lcd;
BasicStepperDriver *_stepper;
int _pin_focus;
int _pin_shutter;
enum RunStep { RUN_OFF, RUN_SETTLE, RUN_FOCUS, RUN_SHUTTER, RUN_RETURN };
RunStep runStep = RUN_OFF;