diff --git a/README.md b/README.md index 607c787..7f1d21a 100644 --- a/README.md +++ b/README.md @@ -277,18 +277,28 @@ To use the library when writing a concrete motor driver, include it in the makef ### Usage as static dependency -This repository is included as a git submodule in some of the driver repositories depending upon sinqMotor. When installing via a Makefile (`make install`) using the PSI build system, the following git command is executed within `/ioc/tools/driver.makefile`: +This repository is included as a git submodule in the driver repositories depending upon sinqMotor. When installing via a Makefile (`make install`) using the PSI build system, the following git command is executed within `/ioc/tools/driver.makefile`: `git submodule update --init --recursive` This forces each submodule to be checked out at the latest commit hash stored in the remote repository. However, this is usually unwanted behaviour, since the higher-level drivers are usually designed to be compiled against a specific version of sinqMotor. In order to set the submodule to a specific version, the following steps need to be done BEFORE calling `make install`: - `cd sinqMotor` -- `git checkout 0.1` +- `git checkout 1.0` - `cd ..` -Then, the fixation of the version to 0.1 needs to be committed in the parent repository: +Then, the fixation of the version to 1.0 needs to be committed in the parent repository: -- `git commit -m "Update sinqMotor to 0.1"` +- `git commit -m "Update sinqMotor to 1.0"` -After this commit, running `make install` will use the correct driver version for compilation. \ No newline at end of file +After this commit, running `make install` will use the correct driver version for compilation. + +If your driver uses another driver as a static dependency via git submodule which in turn includes a sinqMotor submodule, it is not necessary to specify the version of sinqMotor. Instead, specify the desired commit of the direct dependency, commit this change and then update all submodules: + +- `cd turboPmac` +- `git checkout 1.0` +- `cd ..` +- `git commit -m "Update turboPmac to 1.0"` +- `git submodule update --init --recursive` + +This will update sinqMotor to the version specified in the 1.0 commit of turboPmac. \ No newline at end of file