Пример #1
0
void CameraMount::device_loop(Command command){
    if (command.cmp("tilt")) {
      tilt_val = command.args[1];
    }
    if (tilt_val != new_tilt){
      new_tilt = smoothAdjustedCameraPosition(tilt_val,new_tilt);
      tilt.writeMicroseconds(new_tilt);
    }    
}
void CameraMount::device_loop(Command command){
    if (command.cmp("tilt")) {
      tilt_val = command.args[1];
      cameraMountdata::CMTG = tilt_val;
    }
    if (tilt_val != new_tilt){
      new_tilt = smoothAdjustedCameraPosition(tilt_val,new_tilt);
#if(CAMERAMOUNT_PIN != 11) //use timer 1     
      tilt.writeMicroseconds(new_tilt);
#else
      tiltServo(new_tilt);
#endif
      cameraMountdata::CMNT = new_tilt;
    }

    
}